Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Create a Database View

In Enterprise Architect, you model Database Views as stereotyped UML Classes.

Create a Database View

Step

Action

See also

1

On the Data Modeling page of the Toolbox (More tools | Data Modeling), drag the View icon onto your Data Modeling diagram.

 

Views

2

Right-click on the element and select the SQL Object Editor option. The Database View dialog displays.

 

 

3

In the Database field, if it has already been set, the default database type displays.

If the default has not been set, or you want to change the database type for this View, click on the drop-down arrow and select the target DBMS to model.

 

Set the Database Type

 

4

In the View definition field, type the full view definition.

The code editor provides Intelli-sense for basic SQL keywords and functions.

 

Options - Code Editors

Intelli-sense

 

5

If  necessary, in the Notes field type an explanation or description of the View.

 

 

6

Click on the OK button to save your definition.

 

 

 

Add to the View definition

There are two things you can do to add to the View definition, external to the Database View dialog:

·To provide a name for the View, select the element on the diagram, press F2 and type the new name
·Either:
·Create a Dependency connector from the View to each Table on which the View depends, or
·Open the Tagged Values window (Ctrl+Shift+6), add the tag parents and type in the Table names (separated by commas) as the tag value

 Double-click on the View to display the Properties dialog; the Tables are now listed in the Dependencies field, in a vertical list

 

Example

ExampleofaDatabaseViewDiagram

Notes

·The View definition and certain other parameters are held as Tagged Values; the View definition is held in the viewdef memo Tagged Value
 
You can select and view the viewdef Tagged Value in the Tagged Values window, and include it in document reports by inserting the valueOf(viewdef) field in the Package::Package Element or Package::Element sections

 

Learn more

?>