Return to Introduction  Previous page  Next page

Note: Views are currently supported for DB2, SQL Server, Firebird/Interbase, Informix, Ingres, Oracle 9i and 10g, 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.
2.Add a view stereotype as shown above, selecting class in the Base Class field. Select a suitable diagram.
3.Open the Class group on the Enterprise Architect UML Toolbox.
4.Click on the Class element in the list of elements and then click on the diagram.
5.In the Class Properties dialog, from the Stereotype drop-down list select view.
6.Enter a name for the view.
7.Click on the OK button to close the dialog. You now have a database view.
8.Open the Properties dialog again and from the Database drop-down list, select the target DBMS to model. The default database displays if it has already been set.

Creating a View

1.Create a Dependency link from the view Class to the table or tables on which the view depends.
2.On the view Properties dialog, select the View Detail tab and click on the View Definition?/span> button.
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