Views

Return to Introduction  Previous page  Next page

Note:

Views are currently supported for 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 Class

To create a database view, follow the steps below:

  1. Select the Settings | UML menu option. The UML Types dialog displays, at the Stereotypes tab.
     
    StereotypeDlg
     
  2. In the Stereotype field type view, and in the Base Class field type class. Click on the Save button.
  3. Select a suitable diagram.
  4. Open the Class pages on the Enterprise Architect UML Toolbox.
  5. Click on the Class element in the list of elements and then click on the diagram.
  6. In the Class Properties dialog, in the Stereotype field type view.
  7. Enter a name for the view.
  8. Click on the OK button to close the dialog. You now have a database view.
  9. Right-click on the element and select the Properties context menu option. The View Properties dialog now displays.
     
    View Properties 2
     
  10. From the Database drop-down list, select the target DBMS to model. The default database displays if it has already been set.
  11. Click on the Save and Close buttons.

Create a View

  1. Create a Dependency link from the view Class to the table or tables on which the view depends.
  2. Open the view Properties dialog.
  3. Enter the full view definition in the View definition field.
  4. Click on the Save button to save your definition. An example is shown below:
     
    Example of a Database View Diagram