Architecting and designing : UML 2.0 Lite : Object/relational integration : Mapping class diagrams to data models
  
Mapping class diagrams to data models
Object-oriented techniques can be used to design relational databases. Classes and their interrelationships are mapped to tables in a relational database design. There are a number of ways classes and their relationships can be mapped. Relational data modeling theory presents two types of diagrams used to model the relational database:
the logical data model, or Entity Relation (ER) diagram, which represents logical entities of the database and their interrelationships
the physical data model, which represents the actual tables of the database and their interrelationships.
Automatic translations provided
Mapping a Class diagram to a data model, Specifics
During this translation, persistent classes and their attributes are mapped to entities. Associations are mapped to non-specific relationshipos in the ER diagram. Class attribute types are mapped to the appropriate data element types in the ER diagram. The logical ER diagram affords the user the opportunity to perform normalization checks on the model, and to propagate foreign keys. From a logical ER diagram, users can choose to generate physical data models for various target relational database management systems.
See Mapping a class diagram to a data model, specifics.
A logical data model to a physical data model
During this translation, logical entities are mapped to physical tables, and the entity attributes are mapped to columns in the respective tables. Users can choose how to map super/sub relationships over to table structures. From a physical diagram, users can generate schemas for various target relational database management systems.
Mapping a data model to a Class diagram, Specifics
During this translation, entities are mapped to classes, their attributes are mapped to class attributes, and the underlying data elements are mapped directly across so that each class attribute has an underlying data element property. Entity attribute types are mapped to the appropriate language-specific type in the UML class diagram. Relationships in the ER diagram are mapped to associations in the UML class diagram.
See Mapping a data model to a Class diagram, Specifics.
See also
Object/relational integration