Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Mastering UML with Rational Rose 2002.pdf
Скачиваний:
137
Добавлен:
02.05.2014
Размер:
9.68 Mб
Скачать

Chapter 18: Rose Data Modeler

See the upcoming "Adding Tables" section for information about assigning a table to a tablespace.

Adding a Schema

A schema is a container for your data model. All of the tables, fields, triggers, constraints, and other data−modeling elements are contained within a schema. The two exceptions are domains, which are contained within domain packages, and the database itself, which is modeled in the Component view.

In the Logical view, there is a package called Schemas. All of the schemas you create for a project are located within this package. Each schema is modeled as a stereotyped package:

Each schema must be mapped to a database in the model. Each database may contain one or more schemas. The DBMS assigned to a schema will be the same as the DBMS assigned to the schema's database.

To create a schema:

1.

Right−click the Logical View entry in the browser or the Schemas folder within the Logical view.

2.

621

Chapter 18: Rose Data Modeler

Select Data Modeler → New → Schema.

3.

Right−click the new schema in the browser, and select Open Specification.

4.

Select the appropriate database in the Database drop−down list box. The database's DBMS will automatically be filled into the Target field.

Creating a Data Model Diagram

Once the schema has been created, you can create a Data Model diagram within it. A Data Model diagram is used to add, edit, or view tables and other elements within the data model; it serves a similar purpose as the Class diagram in the object model. Although you can add data−modeling elements directly into the browser, the Data Model diagram is a good way to graphically depict the elements and their relationships. You can create as many Data Model diagrams as you need for each schema.

To create a Data Model diagram:

1.

Right−click the schema in the browser.

2.

Select Data Modeler → New → Data Model Diagram.

3.

622