Oracle Views Editor
In a physical model, you can create views, which are SQL queries that are permanently stored in the database under assigned names. The result of a view query is a virtual table. To the database user, a view appears just like a real table with a set of named columns and rows of data. However, a view is not a permanently stored set of data values. The rows and columns of data visible through the view are the result of the database query that defines the view.
You can use views in SQL to:
- Create a customized presentation of the data stored in a database.
- Restrict access to data, allowing different users access to only certain rows or columns of a table.
- Simplify database access by creating customized structures tailored to the needs of individual users. A user can write a simple query on a view rather than a complex query on the actual database tables.
Views are supported in the following features:
- Forward Engineering. When you forward-engineer your data model, the SQL code defining the view is generated to the database.
- Reverse Engineering. When you reverse-engineer an existing database that includes one or more views, each view is imported, the view syntax is parsed, and where possible, view relationships to the tables referenced by the view are created.
If the Create Table statement is not present or not present before the Create View statement in the reverse engineering script, the table from which the view is derived, is converted to a view.
- Complete Compare. When you use complete compare and update a view either in the model or in the database, you can keep the model view specification in sync with the database view specification.
When you add a view to a model, the view graphically appears in the model as a box with a dotted outline and round corners, and a view relationship as a dotted line with circle at the view end of the line. A view relationship between a table, materialized view, or view and a view indicates that the view references one or more of the columns from that table, materialized view, or view.
If you delete a table column that is referenced by a view, you also deletes the corresponding view column. If you delete a table that is referenced by a view, you also delete the corresponding view columns.
Use the Oracle Views Editor to add and change the properties of a view.
The following properties are applicable to an Oracle View object.
Tab |
Section |
Property |
Description |
Additional Information |
Name |
Specifies the physical name of the view | |||
Owner | Specifies the database owner | |||
Force Create | Specifies whether the view is created irrespective whether the base tables of the view or the referenced object types exist or the owner of the schema containing the view has privileges on them. | |||
View Type | Specifies whether the view is an object view or an XML view | |||
Editionable | Specifies whether the view is an editioned or noneditioned object when editioning is enabled | |||
Editioning | Specifies whether the view is single-table view that selects all rows from the base table and displays a subset of the base table columns | |||
Use Replace Syntax | Specifies whether the view is recreated if it already exists | |||
Generate | Specifies whether a SQL statement for the view is generated during forward engineering | |||
General |
View Properties |
Default Collation |
Specifies the default collation for the view |
|
Bequeath Rights |
Specifies whether the functions referenced in the view are executed using the view invoker's rights or the view definer's rights |
Current_User: Indicates that the functions referenced by the view are executed using invoker's right Definer: Indicates that the functions referenced by the view are executed using view definer's right |
||
Sharing |
Specifies how view data is shared |
Metadata: Indicates that a metadata link shares the view’s metadata and the data is unique to each container Data: Indicates that a data link shares the view and the data stays same for all the containers in the application container Extended Data: Indicates that an extended data link shares the view and the data in the application root is the same for all containers in the application container None: Indicates that the view is not shared |
||
Container_Map | Specifies whether the view can be queries using a container map | |||
Container_Default | Specifies whether the view is enabled for the CONTAINERS clause | |||
Other Properties | Create Table As | Specifies whether the table should be created based on the results of a SELECT statement | ||
Object and XML View Properties | Of Type | Specifies the user defined type name used to create an object or XML view | ||
Object Identifier | Object Identifier | Specifies the attributes to be used as a key to identify each row in the object view | ||
Expression/Attribute | Specifies an expression or attribute of the object type from which the object view should be created | |||
Under Superview | Specifies the view name of which the current view is a subview | |||
XML Schema URL | Specifies the URL of a registered XMLSchema | Available only when View Type is set to XML View | ||
XML Schema Specifications | XML Element | Specifies the XML element name | Available only when View Type is set to XML View | |
Varrays Storage Type | Specifies the storage mechanism for varrays in the XML view or column |
Available only when View Type is set to XML View Lobs: Indicates that varrays are stored as LOBs Table: Indicates that varrays are stored as tables |
||
NonSchema | Specifies whether non schema-based documents can be stored in the XMLType column | Available only when View Type is set to XML View | ||
AnySchema | Specifies whether any schema-based document can be stored in the XMLType column | Available only when View Type is set to XML View |
The Oracle View Editor also includes the following tabs:
-
Select Add tables, views, and materialized views to a view column and create aliases and expressions.
-
From Specify the source tables, views, or materialized views.
-
Where Specify the search conditions and criteria to use when you generate the SQL code for a view.
-
User Defined SQL Change a user-provided DDL statement. This tab will be blank if no override has been provided.
-
SQL View the SQL code that is used during Forward Engineering.
-
Alias Lets you add, modify, or delete synonyms for the view.
-
Style lets you specify the styles for the entity. The styles are used to format the font and other graphical themes used in the display of the entity.
-
Icon lets you specify the icon to use for the entity.
-
Synonym Create, edit, or delete synonyms that apply to the selected table.
-
Comment Add or edit comments for a view.
-
Object Creation Order lets you specify the order of DDL generation for stored procedures, functions, or packages by moving the selected object up or down in the hierarchy using the up or down arrow buttons provided.
-
UDP Enter user-defined property values for a view.
-
History lets you view the history information for the entity.
-
Notes View or edit user notes.
Copyright © 2023 Quest Software, Inc. |