Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Views
Note: |
Views are currently supported for: DB2; SQL Server; Firebird/Interbase; Informix; Ingres; Oracle 9i, 10g and 11g; MySQL; PostgreSQL; Sybase Adaptive Server Enterprise (ASE) and Sybase Adaptive Server Anywhere (ASA). |
Create a View
To create a database View, follow the steps below:
- On the Data Modeling page of the Toolbox (More tools | Data Modeling), drag the View icon onto your Data Modeling diagram.
- If the View Properties dialog does not immediately display, double-click on the element.
- From the Database drop-down list, select the target DBMS to model. The default database displays if it has already been set.
- Click on the OK button.
To define a name for the View, click on the element, click on the name (Class<n>) and click again. This highlights the text for editing. Type in the required name.
Define View Properties
- Create a Dependency connector from the View to the table or tables on which the View depends.
- Double-click on the View to display the Properties dialog. The tables are now listed in the Dependencies field.
- In the View definition field, type the full view definition. (The code editor provides intellisense for basic SQL keywords and functions).
- Click on the OK button to save your definition.
The View definition and certain other parameters are held as Tagged Values. The View definition is held in the viewdef memo Tagged Value, as shown in the following example diagram. You can select and view the viewdef Tagged Value in the Tagged Values window, and include it in RTF reports by inserting the valueOf(viewdef) field in the Package::Element or Element::Tagged Values sections.