35 heartland properties program data modeling er

This preview shows page 35 - 42 out of 42 pages.

35
Image of page 35

Subscribe to view the full document.

Heartland Properties Schema 36
Image of page 36
37 Program Data Modeling ER Design works great when you are designing the database right from the start. However, sometimes it may be easier to map Object - Oriented program data Map Objects and Object hierarchy to DB Many ways to do it. What are the choices?
Image of page 37

Subscribe to view the full document.

38 Object/RDBMS How do we map the following Class Model to an RDBMS InterestBearingAccount rate_ : double termDays_ : int minimumBalance_ : double CheckingAccount checkFee_ double Owner name_ : String taxId_ : String Account id_ : String balance_ : double owner_ 1 * InterestBearingAccount and CheckingAccount inherit from Account One to Many Relationship between Owner and Account
Image of page 38
39 Horizontal Partitioning Each concrete class is mapped to a table InterestBearingAccount rate_ : double termDays_ : int minimumBalance_ : double CheckingAccount checkFee_ double Owner name_ : String taxId_ : String Account id_ : String balance_ : double owner_ 1 * OwnerTable name taxId InterestBearingAccountTable id balance ownerId rate termDays CheckingAccountTable id balance ownerId checkFee
Image of page 39

Subscribe to view the full document.

40 Vertical Partitioning Each class is mapped to a table InterestBearingAccount rate_ : double termDays_ : int minimumBalance_ : double CheckingAccount checkFee_ double Owner name_ : String taxId_ : String Account id_ : String balance_ : double owner_ 1 * AccountTable id balance ownerId OwnerTable name taxId InterestBearingAccountTable id rate termDays CheckingAccount id checkFee
Image of page 40
41 Unification Each sub-class is mapped to the same table InterestBearingAccount rate_ : double termDays_ : int minimumBalance_ : double CheckingAccount checkFee_ double Owner name_ : String taxId_ : String Account id_ : String balance_ : double owner_ 1 * AccountTable id acctType balance ownerId rate termDays checkFee OwnerTable name taxId
Image of page 41

Subscribe to view the full document.

42 RDBMS Mapping Horizontal Partitioning entire object within one table only one table required to activate object no unnecessary fields in the table must search over multiple tables for common properties Vertical Partitioning object spread across different tables must join several tables to activate object Vertical Partitioning (cont.) no unnecessary fields in each table only need to search over parent tables for common properties Unification entire object within one table only one table required to activate object unnecessary fields in the table all sub-types will be located in a search of the common table
Image of page 42
You've reached the end of this preview.
  • Winter '08
  • Clement,M
  • Entity-relationship model, entity sets, HPI, Heartland Properties

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern