You perform database modeling and database design in Enterprise Architect using the UML Data Modeling Profile. This profile provides easy-to-use and easy-to-understand extensions to the UML standard, mapping the database concepts of tables and relationships onto the UML concepts of Classes and associations. These extensions also enable you to model database keys, triggers, constraints, RI and other relational database features.
The UML Data Modeling Profile is not currently a ratified standard; however it has wide industry support and is a useful method for bridging the gap between the UML and conventional relational database modeling.
Typical data modeling tasks you might perform are listed at the end of this topic.
For information on forward and reverse engineering of your data models, see the Database Engineering topic.
Tables and Columns
The basic modeling structure of a relational database is the table, which represents a set of records, or rows, with the same structure. The basic organizational element of a relational database is the column. Every individual item of data entered into a relational database is represented by a value in a column of a row in a table.
The UML Data Modeling Profile represents:
- Tables as stereotyped Classes; that is, Class elements with a stereotype of table
- Columns as stereotyped attributes; that is, attributes with a stereotype of column.
Enterprise Architect can generate simple DDL scripts to create the tables in your model. You can also perform Model Driven Architecture (MDA) Transformations to DDL - Enterprise Architect provides a template specifically for DDL transformations.
To help you map Class attributes to Table fields, you can create connectors between specific attributes in the Class element and the column attributes in the Table element. See the Connect to Element Feature topic.
Two types of key are used to access tables: Primary Keys and Foreign Keys. A Primary Key uniquely identifies a record in a table, while a Foreign Key accesses data in some other related table via its Primary Key.
A Primary Key consists of one or more columns; a simple Primary Key (single column) is defined as the attribute of a stereotyped operation. A complex Primary Key (several columns) is defined as the stereotyped operation itself.
A Foreign Key is a collection of columns (attributes) that together have some operational meaning (they enforce a relationship to a Primary Key in another table). Foreign keys are represented in Enterprise Architect as operations with the stereotype FK; the operation parameters become the columns involved in the key.
Enterprise Architect supports import of database schema from these databases:
- MS Access 97, 2000, 2003
- Access 2007
- MS SQL Server 2000, 2005, 2008
- Oracle 9i, 10g and 11g
- Sybase Adaptive Server Anywhere (Sybase ASA)
- Sybase Adaptive Server Enterprise (Sybase ASE).
Typical tasks you can perform when modeling or designing databases include:
- Create a Data Model Diagram
- Create a Table
- Set Properties of a Table
- Create Columns
- Create Oracle Packages
- Create Primary Keys
- Create Foreign Keys
- Create Stored Procedures.
You can also perform additional, advanced procedures such as creating views or indexes and triggers.