Relational Database Design Relational Database Design PROPERTY ACCOUNT MAINTENANCE TENANT OWNER incur rent own 1 N M (1, N) (1, 1) (0, N) for pay Perform the complete transformation steps for the E-R Model of the ‘Real Estate Agency’ described in Topic4. 1 Topic 5 : Relational Database Design
Relational Database Design Solution -- From Step1 OWNER ( Owner #, Owner Name, Owner Address) PROPERTY ( Building#, Address, Value) TENANT(Tenant#, Family Name, First Name, Contact Address, Phone#) MAINTENANCE (Maintenance#, Date, Type, Cost) ACCOUNT( Acct Receipt#, DateofPayment, TypeofAccount, AmountPaid) -- Step2: No weak entity -- Step3: no 1 To 1 relationship -- Step3 -- Step4: 1 To N between OWNER and PROPERTY -- The PROPERTY relation is modified: PROPERTY (Building#, Address, Value, Owner#) Topic 5 : Relational Database Design
Relational Database Design Solution -- Step4: 1 To N between PROPERTY and MAINTENANCE -- The MAINTENANCE relation is modified to: MAINTENANCE(Maintenance#, Date, Type, Cost, Building#) -- Step4: 1 To N between TENANT and ACCOUNT -- The ACCOUNT relation is modified to: ACCOUNT( Acct Receipt#, DateofPayment, TypeofAccount, AmountPaid,Tenant#) -- Step4: 1 To N between PROPERTY and ACCOUNT -- The ACCOUNT relation is modified to: ACCOUNT( Acct Receipt#, DateofPayment, TypeofAccount, AmountPaid,Tenant#, Building#) Topic 5 : Relational Database Design
Relational Database Design Solution -- Step5: M to N relationship between TENANT and PROPERTY -- The RENT relation is created: RENT (Building#, Tenant#, LeasedPeriod, Bond) -- Step6: no multivalued attribute. -- Step7: no ternary relatiosnhip - Topic 5 : Relational Database Design
Relational Database Design Solution -- Finally, the end result of the transformation can be listed as follows. OWNER ( Owner #, Owner Name, Owner Address) PROPERTY (Building#, Address, Value, Owner#) TENANT(Tenant#, Family Name, First Name, Contact Address, Phone#) MAINTENANCE(Maintenance#, Date, Type, Cost, Building#) ACCOUNT( Acct Receipt#, DateofPayment, TypeofAccount, AmountPaid, Tenant#, Building#) RENT(Building#, Tenant#, LeasedPeriod, Bond) Step 1 Step 4 Step 1 Step 4 Step 4 Step 5 Topic 5 : Relational Database Design