View Designer
The View Designer lets you create and modify views. This section covers the following topics:
Creating Views in Oracle Developer Tools
Use the View Designer to create a new view or replace an existing view. The Oracle Output Window displays the SQL statements that the View Designer executes, as well as any errors that occurred while saving. After you create a view, you can view or edit a view's data by using Oracle Data Window or you can add a trigger to it using the View node menu.
Starting the View Designer
-
If you are creating a new view, right-click the Views node and from the menu, select New Relational View, New XML View, or New Object View.
-
If you are modifying an existing view, expand the Views node, right-click the node for the view you want, and from the menu, select Design.
The View Designer appears similar to the following:
Using the View Designer
The View Designer creates new views and replaces existing views.
The controls in the View Designer are as follows:
Control | Description |
---|---|
Schema name |
Select from the list of available schemas in which to create the view. |
View name |
Enter the name of the view you want to create. If you are replacing an existing view, this box displays the view name. To enter a case-sensitive name, enclose the name in double quotation marks. |
View type |
Displays one of the following:
|
Read only |
Ensures that the view cannot be updated. The option applies only to relational views |
Editable |
Allows the view to be edited. Select the Create with CHECK option check box to prohibit any changes to the table or view that would produce rows that are not included in the subquery. If you use the view in subquery of a DML statement, you can specify this clause in a subquery in the |
Base Type |
For Object Views only: Specifies the UDT that this object view is based on. |
Object Identifier |
For Object views: Specifies the object identifier for this view. The default is no text. Fox XML views: Specifies the attributes that will to identify each row. In most cases, these attributes correspond to the primary key columns of the base table. You must ensure that the attribute list is unique and identifies exactly one row in the view. This option does not apply to relational views. |
Query text |
Enter the |
Super View |
For Object views only: Specifies a super view. The list displays all object views that are accessible to the current logged on user according to the filters. |
XML schema name |
Specifies the XML schema for the column, an XML schema to which the column must conform. Available choices are as follows:
If you specify an XML schema, you must specify an XML Root Element. The option applies only to XML views. |
XML root element |
For XML views only: Specifies the XML root element for the view. |
Preview SQL |
Displays the |
Save |
Commits the view to the database. Alternatively, you can click the Save button in the Visual Studio .NET toolbar or select Save from the File menu. |
Creating Triggers on Existing Views
After you create a view, you can create a trigger on it:
- In Server Explorer, expand the Views node, and then select the view to which you want to add a trigger. The view will have a Triggers node.
- Right-click the view's node and from the menu, select Add Trigger.
- Follow the steps in the Trigger Designer to create the trigger.
See Also
Views Node | View Column Node | View Triggers Node | Run Dialog Box | Oracle Query Window