Oracle® HTML DB User's Guide Release 2.0 Part Number B16373-01 |
|
|
View PDF |
Object Browser enables developers to browse, create, and edit objects in multiple schemas in a single database.
This section contains the following topics:
The Object Browser page is divided into two sections:
Object Selection pane displays on the left side of the Object Browser page and lists database objects of a selected type within the current schema. You can further narrow the results by filtering on the object name.
Detail pane displays to the right of the page and displays detailed information about the selected object. To view object details, select an object in the Object Selection pane. Click the tabs at the top of the Detail pane to view additional details about the current object. To edit an object, click the appropriate button.
To access Object Browser:
Log in to Oracle HTML DB.
Click the SQL Workshop icon on the Workspace home page.
The SQL Workshop home page appears.
To view Object Browser you can either:
Click the Object Browser icon.
Click the down arrow on the right side of the icon to view a pull-down menu. Then, select the appropriate menu option.
Note: For the purposes of consistency, this document uses the primary navigation path (or drill-down approach) when explaining navigation. |
The Object Selection pane displays on the left side of the Object Browser page and lists database objects by type with the current schema. You can filter the view by selecting an object type or entering a case insensitive search term.
Topics in this section include:
To search or filter objects in the Object Selection pane:
Navigate to Query Builder:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
Select a schema from the Schema list on the right side of the page.
Only objects in the current schema display. Remember that the values available in the schema depend upon your workspace privileges.
Select an object type from the Object list.
The list of objects that appears depends upon the available objects in the current schema. Note that any object having a red bar adjacent to it is invalid.
To search for an object name, enter a case insensitive search term in the search field.
To view all objects, leave the search field blank.
You can hide the Object Selection pane by selecting the Hide Objects control. This control displays on the right side of the Object Selection pane. If the Object Selection pane appears, selecting this control hides it. Similarly, if the Object Selection pane is hidden, selecting this control causes the pane to reappear.
You can create new database objects using the Create Database Object Wizard. Once you select an object, a set of tabs and buttons appears at the top of the Detail pane. Use the tabs to view different aspects of the current items (for example, a tables indexes). Use the buttons to modify the current object.
To create a new object:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
Click Create, located in the upper right corner of the Detail pane.
From the list of object types, select the type of object you want to create.
Follow the on-screen instructions.
A table is a unit of data storage in an Oracle database, containing rows and columns. When you view a table in Object Browser, a table description appears that describes each column in the table.
Topics in this section include:
To create a new table:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
Click Create.
From the list of object types, select Table.
Enter a table name.
Table names must conform to Oracle naming conventions and not contain spaces or start with a number or underscore.
To have the final table name match the case entered in the Table Name field, click Preserve Case.
Enter details for each column. For each column:
Enter the column name.
Select the column type. Available types include NUMBER, VARCHAR2, DATE, TIMESTAMP, CHAR, CLOB, BLOB, NVARCHAR2, BINARY_FLOAT, and BINARY_DOUBLE
Enter the following additional information as appropriate:
Precision
Scale
To specify a column should not be NULL, select the check box in the Not Null column.
To change the order of previously entered columns, click the Up and Down arrows in the Move column. To add additional columns, click Add Column.
Next, define the primary key for this table (optional). A primary key is a single field or combination of fields that uniquely identifies a record.
For Primary Key, select one of the following and click Next:
No primary key - No primary key is created.
Generated from a new sequence - Creates a primary key and creates a trigger and a new sequence. The new sequence is used in the trigger to populated the selected primary key column. The primary key can only be a single column.
Generated from an existing sequence - Creates a primary key and creates a trigger. The selected sequence is used in the trigger to populate the selected primary key column. The primary key can only be a single column.
Not generated - Defines a primary key but does not have the value automatically populated with a sequence within a trigger. You can also select this option to define a composite primary key (that is, a primary key made up of more than one column).
Next, add foreign keys (optional). A foreign key establishes a relationship between a column (or columns) in one table and a primary or unique key in another table.
To add a foreign key:
Name - Enter a name of the foreign key constraint that you are defining.
Select Key Column(s) - Select the columns that are part of the foreign key. Once selected, click the Add icon to move them to Key Column(s).
References Table - Select the table which will be referenced by this foreign key. Then, select the columns to be referenced by this foreign key. Once selected, click the Add icon to move the selected columns to Referenced Column(s).
Select one of the following:
Disallow Delete - Blocks the delete of rows from the referenced table when there are dependent rows in this table.
Select Cascade Delete - Deletes the dependent rows from this table when the corresponding parent table row is deleted.
Set to Null on Delete - Sets the foreign key column values in this table to null when the corresponding parent table row is deleted.
Click Add.
Click Next.
Next, add a constraint (optional). You can create multiple constraints, but you must add each constraint separately.
To add a constraint:
Specify the type of constraint (Check or Unique).
A check constraint is a validation check on one or more columns within the table. No records can be inserted or updated in a table which violates an enabled check constraint. A unique constraint designates a column or a combination of columns as a unique key. To satisfy a unique constraint, no two rows in the table can have the same values for the specified columns.
Enter the constraint in the field provided. For unique constraints, select the column(s) that are to be unique. For check constraints, enter the expression that should be checked such as, flag in ('Y','N')
.
Click Add.
Click Finish.
A confirmation page appears. To view the SQL used to create the table, click SQL Syntax.
Click Create.
Note that you do not need to follow the steps for creating a table in the order described in the previous procedure. Instead of navigating through the wizard by clicking the Next and Previous button, you can also access a specific step by selecting it in the progress indicator on the left side of the page.
See Also: Oracle Database Concepts for information about tables |
When you view a table in Object Browser, the table description appears. While viewing this description, you can add a column, modify a column, rename a column, drop a column, rename the table, copy the table, drop the table, truncate the table, or create a lookup table based upon a column in the current table. Additionally, you have access other reports that offer related information including the table data, indexes, data model, constraints, grants, statistics, user interface defaults, triggers, dependencies, and SQL to produce the selected table.
To view a table description:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Tables.
From the Object Selection pane, select a table.
The table description appears.
Click the tabs at the top of the page to view different reports about the table. Table 18-1 describes all available views.
Table 18-1 Available Views for Tables
View | Description |
---|---|
Table | While viewing table details you can add, modify, delete, or rename a column. Additionally, you can drop, rename, copy, or truncate the table as long as the referencing table has no records well as create a lookup table.
See Also: "Editing a Table" |
Data | Displays a report of the data in the current table. Actions you can perform include:
|
Indexes | Displays indexes associated with this table. Actions you can perform include Create and Drop.
See Also: "Managing Indexes" |
Model | Displays a graphical representation of the selected table along with all related tables. Related tables are those that reference the current table in a foreign key and those tables referenced by foreign keys within the current table.
You can position the cursor over an underlined table name to view the relationship between that table and the current table. Click an underlined table name to view the model of the related table. |
Constraints | Displays a list of constraints for the current table. Actions you can perform include Create, Drop, Enable, and Disable. |
Grants | Displays a list of grants on the current table, including the grantee, the privilege, and grant options. Actions you can perform in this view include Grant and Revoke. |
Statistics | Displays collected statistics about the current table, including the number of rows and blocks, the average row length, sample size, when the data was last analyzed, and the compression status (enabled or disabled). Click Analyze to access the Analyze Table Wizard. |
UI Defaults | Displays user interface defaults for forms and reports. User interface defaults enable developers to assign default user interface properties to a table, column, or view within a specified schema.
Click Edit to edit defined user interface defaults. Click Create to initialize user interface defaults for tables that do not currently have user interface defaults defined. See Also: "Managing User Interface Defaults" |
Triggers | Displays a list of triggers associated with the current table. Actions you can perform include Create, Drop, Enable, and Disable.
To view trigger details, click the trigger name. See Also: "Managing Triggers" |
Dependencies | Displays report showing objects referenced by this table, objects this table references, and synonyms for this table. |
SQL | Displays the SQL necessary to re-create this table, including keys, indexes, triggers and table definition. |
While viewing a table description, you can edit it by clicking the buttons above the table description.
To edit a table:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Tables.
From the Object Selection pane, select a table.
The table description appears.
Click the appropriate button described in Table 18-2.
Table 18-2 Edit Table Buttons
Button | Description |
---|---|
Add Column | Adds a new column to the table. Enter a column name and select a type. Depending upon the column type, specify whether the column requires a value as well as the column length, precision, and scale. |
Modify Column | Modifies the selected column. |
Rename Column | Renames the selected column. |
Drop Column | Drops the selected column. |
Rename | Renames the selected table. |
Copy | Copies the selected table. |
Drop | Drops the selected table.
See Also: "Using the Recycle Bin to View and Restore Dropped Objects" |
Truncate | Removes all rows from the selected table. Truncating a table can be more efficient than dropping and re-creating a table. Dropping and re-creating a table may invalidate dependent objects, requiring you to regrant object privileges or re-create indexes, integrity constraints, and triggers. |
Create Lookup Table | Creates a lookup table based on the column you select. That column becomes a foreign key to the lookup table. |
A view is a logical representation of another table or combination of tables. A view derives its data from the tables on which it is based. These tables are called base tables. Base tables might in turn be actual tables or might be views themselves. All operations performed on a view actually affect the base table of the view. You can use views in almost the same way as tables. You can query, update, insert into, and delete from views, just as you can standard tables.
Topics in this section include:
See Also: Oracle Database Administrator's Guide for information about views |
To create a new view:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
Click Create.
From the list of object types, select View.
Define the view:
View Name - Enter a name for the View.
Query - Specify a query to define the view.
To access Query Builder or SQL Command Processor, click the appropriate link at the bottom of the page. The selected tool appears in a pop-up window. Once you create the appropriate SQL, click Return to automatically close the popup window and return to the wizard with the SQL.
Click Next.
A confirmation page appears. To view the SQL used to create the view, click SQL.
Click Create.
When you access a view in Object Browser, the Detail pane displays a report listing the columns in that view.
To browse a view:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Views.
From the Object Selection pane, select a view.
The view definition appears displaying the appropriate columns.
Click the tabs at the top of the page to view different reports. Table 18-3 describes all available views.
Table 18-3 Available Views for Views
View | Description |
---|---|
View | (Default) Displays the columns in the current view. Actions you can perform include:
See Also: "Editing a View", "Compiling a View", and "Dropping a View" |
Data | Displays a report of the data in the columns in the view. Actions you can perform include:
|
Grants | Displays a list of grants associated with the columns in the view. Grant details include grantee, privilege, and grant options. Actions you can perform include Grant and Revoke. |
UI Defaults | Displays user interface defaults for forms and reports. User interface defaults enable developers to assign default user interface properties to a table, column, or view within a specified schema.
Click Edit to edit existing user interface defaults. Click Create to initialize user interface defaults for views that do not currently have user interface defaults defined. See Also: "Managing User Interface Defaults" |
Dependencies | Displays a report showing objects referenced by this view, objects this view references, and synonyms for this view. |
SQL | Displays the SQL necessary to re-create this view. |
When you edit a view you can edit the code manually, perform a search and replace, and compile the view. Additionally, you can save the view as a file or drop it.
To edit a view manually:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Views.
From the Object Selection pane, select a view.
Select the Code tab.
Click Edit to activate manual edit mode.
If you edit and make changes to a view, you need to compile.
Note: You can expand the Edit pane by clicking the Full Screen icon in the upper right of the pane, beneath the Create button. |
If you edit and make changes to a view, you need to compile in order to save your changes. Note that there is no save function since this is just a view of the object within the database.
Click Compile to re-create the current view.
An index is an optional structure associated with tables and clusters. You can create indexes on one or more columns of a table to speed access to data on that table.
When you view an index in Object Browser, the Detail pane displays a report containing the index name, index type, table owner, table type, and a listing of the indexed columns.
Topics in this section include:
See Also: Oracle Database Concepts for information about indexes |
To create an view:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
Click Create.
From the list of object types, select Index.
Select a table and select the type of index you want to create. Available index types include:
Normal - Indexes one or more scalar typed object attributes of a table
Text - Creates a text index (Oracle Text)
Click Next.
Create the index definition. Specify an index name, select one or more columns to be indexed, and click Next.
A confirmation page appears. To view the SQL used to create the index, click SQL.
Click Finish.
To browse an index:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Indexes.
From the Object Selection pane, select an index.
The index appears displaying the index name, type, table owner, and table type as well as a listing of indexed columns.
Click the tabs at the top of the page to view different reports about the index. Table 18-4 describes all available views.
Table 18-4 Available Views for Indexes
View | Description |
---|---|
Object Details | (Default) Displays the index name, index type, table owner, and table type as well as a listing of the indexed columns. Actions you can perform while viewing Object Details include:
|
Statistics | Displays collected statistics about the current view, including the number of rows, sample size, when the data was last analyzed, and the compression status (enabled or disabled). Click Analyze to refresh the displayed statistics. |
SQL | Displays the SQL necessary to re-create this index. |
A sequence generates a serial list of unique numbers for numeric columns of a database table. Database sequences are generally used to populate table primary keys.
Topics in this section include:
See Also: Oracle Database Administrator's Guide for information about sequences |
To create a sequence:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
Click Create.
From the list of object types, select Sequence.
Define the sequence, specify a sequence name, and click Next.
A confirmation page appears. To view the SQL used to create the sequence, click Show SQL.
Click Create.
To browse a sequence:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Sequences.
From the Object Selection pane, select a sequence.
The Object Details view appears.
Click the tabs at the top of the page to view different reports about the sequence. Table 18-5 describes all available views.
Table 18-5 Available Views for Sequences
View | Description |
---|---|
Object Details | (Default) Displays details about the current sequence. Actions you can perform in this view include Alter and Drop. |
Grant | Displays a list of grants associated with the sequence. Grant details include grantee, privilege, and grant options. Actions you can perform include Grant and Revoke. |
Dependencies | Displays a list of objects that use (or depend) upon this sequence. |
SQL | Displays the SQL necessary to re-create this sequence. |
A type is a user-specified object or collection definition. Oracle HTML DB currently only supports collection definitions. There are two categories of Oracle collections (SQL collections):
Variable-length arrays (VARRAY
types)
Nested tables (TABLE
types)
VARRAY
types are used for one-dimensional arrays, while nested table types are used for single-column tables within an outer table.
Topics in this section include:
See Also: Oracle Database Concepts and SQL*Plus User's Guide and Reference for information about collection types |
To create a collection type:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
Click Create.
From the list of object types, select Type.
Specify a name and click Next.
Select a type, data type, limit, and click Next.
A confirmation page appears. To view the SQL used to create the collection type, click Show SQL.
Click Finish.
To browse a collection type:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Type.
From the Object Selection pane, select a type.
The Object Details view appears.
Click the tabs at the top of the page to view different reports. Table 18-6 describes all available views.
Table 18-6 Available Views for Types
View | Description |
---|---|
Object Details | (Default) Displays details about the selected type. To drop a type, click Drop. |
Synonyms | Displays a list of synonyms for the current type. |
Grants | Displays a list of grants associated with the type. Grant details include grantee, privilege, and grant options. Actions you can perform include Grant and Revoke. |
SQL | Displays the SQL necessary to re-create this type. |
A package is a database object that groups logically related PL/SQL types, items, functions and procedures. Packages usually have two parts, a specification and a body. The specification is the interface to your application. The body implements the specification.
Topics in this section include:
See Also: SQL*Plus User's Guide and Reference for information about PL/SQL packages |
To create a package:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
Click Create.
From the list of object types, select Package.
Select the type of package you want to create:
Specification
Body
Package with methods on database tables
If you select Specification:
Enter a name and click Next.
The wizard creates a dummy package specification and displays it for editing.
Edit the specification and click Finish.
If you select Body:
Select the package you want to create the body for and click Next
The wizard creates a package body with stubbed out calls identified in the specification and displays it for editing.
Edit the package body and click Finish.
If you select Package with methods on database tables:
Enter a name and click Next.
Select up to ten tables and click Next.
The wizard creates a specification and body with insert, update, delete, and GET APIs for the selected tables. Note that you have the option to show or download the specification or body.
Click Finish.
When you access a package in Object Browser the specification appears.
To view a specification:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Packages.
From the Object Selection pane, select a package.
The Specification appears. You can copy the code in this view for use in other tools.
Click the tabs at the top of the page to view different reports about the package. Table 18-7 describes all available views.
Table 18-7 Available Views for Packages
View | Description |
---|---|
Specification | (Default) Displays the package specification. This define the interface to your application. Actions you can perform include:
|
Body | Displays the package body, if one exists, for the selected package. Actions you can perform include:
|
Dependencies | Displays objects that use (or depend on) on the current package and objects the package depends on. |
Errors | Displays errors related to the current package. |
Grants | Lists details of grants for the current package, including privilege, grantee, grantable, grantor, and object name. |
When you edit a package, you can edit the code manually, perform a search and replace, and compile the package.
To edit a package manually:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Packages.
From the Object Selection pane, select a package.
The Specification appears. You can copy the code in this view for use in other tools. Note you can edit both the specification and the body fromObject Browser.
Click Edit to activate edit mode.
Click Find to perform a basic search and replace.
Note: You can expand the Edit pane by clicking the Full Screen icon in the upper right of the pane, beneath the Create button. |
If you edit and make changes to a package, you need to compile in order to save your changes. There is no save function because this is just a view of the object within the database.
Click Compile to compile the current package. Compiling re-creates the object in the database. If the compile fails, an error message display above the code.
A procedure is a subprogram that performs a specific action. You can use Object Browser to view, create, edit, download, and drop procedures.
Topics in this section include:
See Also: SQL*Plus User's Guide and Reference for information about PL/SQL procedures |
To create a procedure:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
Click Create.
From the list of object types, select Procedures.
Enter a procedure name and click Next.
Define the arguments by specifying the following information (optional):
Argument Name
In/Out (the parameter mode)
Argument Type (datatype)
Default (value)
To add additional arguments, click Add Argument.
Click Next.
Enter PL/SQL block you want to use as the procedure body and click Next.
To view the previously defined arguments, click Defined Arguments.
A confirmation page appears. To view the SQL used to create the procedure, click Show SQL.
Click Finish.
To browse a procedure:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Procedures.
From the Object Selection pane, select a procedure.
The Code view appears, displaying the source code for the procedure. You can copy the code in this view for use in other tools.
Click the tabs at the top of the page to view different reports about the procedure. Table 18-8 describes all available views.
Table 18-8 Available Views for Procedures
View | Description |
---|---|
Code | (Default) Displays the source code for the procedure. You can copy the code in this view for use in other tools. Actions you can perform in this view include:
See Also: "Editing a Procedure", "Compiling a Procedure", "Downloading a Procedure", and "Dropping a Procedure" |
Dependencies | Displays objects that use (or depend) on the current procedure and objects the procedure depends on. |
Errors | Lists errors related to the current procedure. |
Grants | Lists details of grants for the current procedure, including privilege, grantee, grantable, grantor, and object name. |
When you edit a procedure you can edit the code manually or perform a search and replace.
To edit a procedure manually:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Procedures.
From the Object Selection pane, select a procedure.
The Code view appears. Be default, you can copy the code in this view for use in other tools.
Click Edit to activate edit mode.
Click Find to perform a basic search and replace.
Note: You can expand the Edit pane by clicking the Full Screen icon in the upper right of the pane, beneath the Create button. |
If you edit and make changes to a procedure, you need to compile in order to save your changes. There is no save function because this is just a view of the object within the database.
Click Compile to compile the current procedure. Compiling re-creates the object in the database. If the compile fails, an error message display above the code.
A function is a subprogram that can take parameters and return a single value.
Topics in this section include:
See Also: SQL*Plus User's Guide and Reference for information about PL/SQL functions |
To create a function:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
Click Create.
From the list of object types, select Functions.
Enter a function name, specify the return datatype, and click Next.
Define the arguments and click Next (optional):
Argument Name
Argument Type (datatype)
Default (value)
To add additional arguments, click Add Argument.
Enter P/LSQL block you want to use as the function body and click Next.
To link to the SQL Command Processor, click Command Processor. To view the previously defined arguments, click Defined Arguments.
A confirmation page appears. To view the SQL used to create the function, click Show SQL.
Click Finish.
To view a function in Object Browser:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Functions.
From the Object Selection pane, select a function.
The Code view appears. You can copy the code in this view for use in other tools.
Click the tabs at the top of the page to view different reports about the function. Table 18-9 describes all available views.
Table 18-9 Available Views for Functions
View | Description |
---|---|
Code | (Default) Displays the source code for the function. You can copy the code in this view for use in other tools. Actions you can perform in this view include:
See Also: "Editing a Function", "Compiling a Function", "Downloading a Function", and "Dropping a Function" |
Dependencies | Displays objects that use (or depend) on the current function and objects the function depends on. |
Errors | Displays errors related to the current function. |
Grants | Lists details of grants for the current function, including privilege, grantee, grantable, grantor, and object name. |
When you edit a function you can edit the code manually, perform a search and replace, and compile the function.
To edit a function manually:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Functions.
From the Object Selection pane, select a function.
The Code view appears. Be default, you can copy code from this view for use in other tools.
Click Edit to activate manual edit mode.
Click Find to perform a basic search and replace.
Note: You can expand the Edit pane by clicking the Full Screen icon in the upper right of the pane, beneath the Create button. |
If you edit and make changes to a function, you need to compile in order to save your changes. There is no save function because this is just a view of the object within the database.
Click Compile to compile the current function. Compiling re-creates the object in the database. If the compile fails, an error message display above the code.
A database trigger is a stored subprogram associated with a database table, view, or event. The trigger can be called once, for example when an event occurs, or many times, for example for each row affected by an INSERT, UPDATE, or DELETE statement.
Topics in this section include:
See Also: Oracle Database Concepts and SQL*Plus User's Guide and Reference for information about triggers |
To create a trigger:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
Click Create.
From the list of object types, select Trigger.
Select a table name and click Next.
Select the appropriate trigger attributes, enter the trigger body, and click Next.
A confirmation page appears. To view the SQL used to create the trigger, click SQL.
Click Finish.
To browse a trigger in Object Browser:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Triggers.
From the Object Selection pane, select a trigger.
The Details view appears.
Click the tabs at the top of the page to view different reports about the trigger. Table 18-10 describes all available views.
Table 18-10 Available Views for Triggers
View | Description |
---|---|
Object Details | (Default) Lists of the details about the current trigger. Actions you can perform include:
See Also: "Editing a Trigger", "Compiling a Trigger", "Downloading a Trigger", and "Dropping a Trigger" |
Errors | Displays errors related to the current trigger. |
SQL | Displays the SQL necessary to re-create the trigger. |
When you edit a trigger you can edit the code manually, perform a search and replace, and compile the trigger.
To edit a trigger manually:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Triggers.
From the Object Selection pane, select a trigger.
Select the Code tab and then click Edit to activate manual edit mode.
Click Find to perform a basic search and replace.
Note: You can expand the Edit pane by clicking the Full Screen icon in the upper right of the pane, beneath the Create button. |
If you edit and make changes to a function, you need to compile in order to save your changes. There is no save function because this is just a view of the object within the database.
Click Compile to compile the current trigger. Compiling re-creates the object in the database. If the compile fails, an error message display above the code.
A database link is a schema object in one database that enables you to access objects in another database. Once you create a database link, you can access the remote objects by appending @dblink
to the table or view name, where dblink
is the name of the database link.
Topics in this section include:
To create a database link:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
Click Create.
From the list of object types, select Database Link.
Specify the following information and click Next.
Database Link Name
Connect To Schema
Password
Remote Hostname or IP
Remove Host Port
SID or Service Name
A confirmation page appears.
To view the SQL used to create the database link, click Show SQL.
Click Create.
To browse a database link:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Database Links.
From the Object Selection pane, select a database link.
The Object Details View appears.
Click the tabs at the top of the page to view different reports about the database link. Table 18-11 describes all available views.
Table 18-11 Available Views for Database Links
View | Description |
---|---|
Object Details | (Default) Displays details about the database link. Actions you can perform include:
|
Dependencies | Displays a list of objects that use (or depend) upon this database link. |
SQL | Displays the SQL necessary to re-create this database link. |
A materialized view provides indirect access to table data by storing the results of a query in a separate schema object. Unlike an ordinary view, which does not take up any storage space or contain any data, a materialized view contains the rows resulting from a query against one or more base tables or views. A materialized view can be stored in the same database as its base tables or in a different database.
Topics in this section include:
See Also: Oracle Database Concepts for information about materialized views |
To create a materialized view:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
Click Create.
From the list of object types, select Materialized View.
Define the materialized view:
Materialized View Name - Enter a name.
Query - Specify a query to define the view.
To access Query Builder or SQL Command Processor, click the appropriate link at the bottom of the page. The selected tool appears in a pop-up window. Once you generate the appropriate SQL, click Return to automatically close the popup window and return to the wizard with the SQL.
Click Next.
A confirmation page appears. To view the SQL used to create the materialized view, click SQL.
Click Create.
To view a materialized view:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Materialized Views.
From the Object Selection pane, select a view.
The Materialized View appears.
Click the tabs at the top of the page to view different reports about the materialized view. Table 18-12 describes all available views.
Table 18-12 Available Views for Materialized View
View | Description |
---|---|
Materialized View | (Default) Displays details about the columns in the materialized view, including:
Click Drop to delete the current materialized view. |
Data | Displays a report of the data in the columns. Actions you can perform include:
|
Details | Displays object details stored in DBA_SNAPSHOTS such as updatable and status. |
Grants | Displays a list of grants on the current view, including grantee, privilege, and grant options. Actions you can perform in this view include Grant and Revoke. |
Dependencies | Displays a list of objects that use (or depend) upon this materialized view. |
SQL | Displays the SQL necessary to re-create this materialized view. |
A synonym is an alias for a schema object. Synonyms can provide a level of security by masking the name and owner of an object and by providing location transparency for remote objects of a distributed database. Also, they are convenient to use and reduce the complexity of SQL statements for database users.
Topics in this section include:
See Also: Oracle Database Administrator's Guide for information about synonyms |
To create a synonym:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
Click Create.
From the list of object types, select Synonym.
Define the synonym:
Synonym Name - Enter a name.
Public or Private - Specify whether the synonym should be public or private.
Schema - Select the database schema (or username) which owns the object upon which you want to create your synonym.
Object - Enter the name of the object upon which you want to create a synonym.
Database Link - Enter the name of the database link to use if the synonym is to be create on a remote object.
Click Next.
A confirmation page appears. To view the SQL used to create the synonym, click Show SQL.
Click Finish.
To view a synonym:
Navigate to Object Browser:
Click the SQL Workshop icon on the Workspace home page.
Click Object Browser.
Object Browser appears.
From the Object list, select Synonyms.
From the Object Selection pane, select a synonym.
The Object Details view appears displaying the following:
Synonym owner
Synonym name
Object owner
Object Name
Object Status
Status