1 / 16

Database Design – Lecture 14

Database Design – Lecture 14. Converting an OO Data Model to a Class Diagram. Steps to Convert from an OODM to a Rose Model. Moving from the OODM to a Rose Class diagram is similar to creating a Relational Schema in Relational Database Design.

lauren
Download Presentation

Database Design – Lecture 14

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Database Design– Lecture 14 Converting an OO Data Model to a Class Diagram

  2. Steps to Convert from an OODM to a Rose Model • Moving from the OODM to a Rose Class diagram is similar to creating a Relational Schema in Relational Database Design. • There should be minimal changes to make to the structure of the classes. • However, need to prepare for converting to a relational structure so there are some steps that need to be taken.

  3. Steps to Convert from an OODM to a Rose Model • To start: • Make all attributes atomic. • Remove references to other classes (ADTs) from the class. In the class diagram, we will show the relationships via associations, aggregations and compositions. • Create new classes for multi-valued attributes. • Remove derived attributes.

  4. Conversion Examples • Simple Object • Convert OODM class to a Rose class Visio class: Rational Rose class:

  5. Conversion Examples • Composite Object • Convert OODM class to a Rose class • Multi-valued attribute becomes a Rose class Visio class: Rational Rose classes:

  6. Conversion Examples • Compound Object • Convert OODM class to a Rose class • Create a Rose class for the object that is referenced Visio class: Rational Rose classes:

  7. Conversion Examples • Hybrid Object • Convert OODM class to a Rose class • Create a Rose class for the object that is referenced (i.e. Education) and create another Rose class for the multi-valued attribute (i.e. dateEarned)

  8. Conversion Examples Visio class: Rational Rose classes:

  9. Steps to Convert from an OODM to a Rose Model • How to handle relationships • Assume relationship is denoted with an association initially. Further analysis may still determine aggregation/composition or inheritance (if not already done in the OODM). • Multiplicity is translated based on the multiplicity shown in the OODM. • Assume associations are bi-directional unless either logically obvious they are not or if application processing describes the direction.

  10. Steps to Convert from an OODM to a Rose Model • Relationships: • Customer:Address is 1:1 (bi-directional)

  11. Steps to Convert from an OODM to a Rose Model • Relationships: • Plan:Client is 1:M

  12. Steps to Convert from an OODM to a Rose Model • Relationships: • Movie:Actor is 1:1 (uni-directional)

  13. Steps to Convert from an OODM to a Rose Model • Relationships: • Employee:Beneficiary is M:N • Create an association or intersection class

  14. Steps to Convert from an OODM to a Rose Model • Relationships: • Employee:Beneficiary is M:N • With an intersection class

  15. Steps to Convert from an OODM to a Rose Model • Relationships: • Employee:Dependent is 1:M • Aggregation

  16. Steps to Convert from an OODM to a Rose Model • Relationships: • Employee:Dependent is 1:M • Composition

More Related