Database Design for Smarties: Using UML for Data Modeling

The Language of Peace

SQL-92 provides a comprehensive schema definition language. The section "Conformity Rules" shows you the steps you take to transform your OO model into that language using the techniques presented in the previous sections in this chapter. The next section, "Nonconformity Rocks," departs from the standard language to show you some techniques in Oracle7, as an example, that provide alternatives to the standard process.

The transformation process uses the example data model from Figures 11-1, 11-2, and 11-3.

Conformity Rules

There are two basic steps to creating an SQL-92 conforming database from a UML data model: creating tables from persistent types and creating tables for many-to-many and ternary associations. Each step has various choices to make. The preceding parts of this chapter have discussed each of these choices in the context of the UML constructs; this section guides you through a complete transformation, connecting everything.

Persistent Classes

As the first transformation, create a table for each class in your UML data model that has the persistent stereotype, including association classes and classes that inherit from other classes. Name the table with the name of the class. From Figure 11-1, the Person subsystem, you create 10 tables: Person, Address, Identification, Expiring ID, Driver License, Passport, NationalID, Law Enforcement ID, Social Security Card, and Birth Certificate.

Note

You may merge the association class into another table later if that proves feasible. For now, leave it as a separate table in your emerging schema.

Within each table, now add...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Optical Tables
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.