50 likes | 117 Views
mMpn Exercises. PAYMENT SeqNum. LOAN LoanID. CUSTOMER CustID. (0,n). (1,1). (1,1). (1,n). A car loan to a customer is paid back by regular monthly, numbered payments. Payments are identified by which loan and which payment number. PERSON SSN. PLAYER position. COACH. is_a. is_a.
E N D
mMpn Exercises Database Principles
PAYMENT SeqNum LOAN LoanID CUSTOMER CustID (0,n) (1,1) (1,1) (1,n) • A car loan to a customer is paid back by regular monthly, numbered payments. Payments are identified by which loan and which payment number. Database Principles
PERSON SSN PLAYER position COACH is_a is_a trains (1,1) (1,n) • Baseball teams consist of players and coaches. The former are known to play different positions. All players have a coach responsible for their training. Database Principles
ACCOUNT BRANCH AcctNum Name CUSTOMER SSN held with (0,n) (1,1) (c,d) (a,b) (1,n) • Must a customer have accounts with only 1 branch? • Do branches share responsibility for accounts? (e,f) opens (g,h) (1,n) No. h == n and c == 1 No. d == 1 Database Principles
(e,f) (0,n) qualified to repair PLANETYPE TypeName (1,n) (g,h) (a,b) (1,1) is of type MECHANIC SSN (c,d) repaired by PLANE PlaneID (0,n) (1,n) (k,l) date (0,n) (I,j) • What is the obvious mistake in the above diagram? • Does the model support the enterprise rule that there should always be a mechanic able to repair any plane in need? (c,d)=(0,n). It should be (1,1) No, e=0, a=1 implies there may be a planeand no mechanic qualified to repair it. Database Principles