er modeling practice exercise solutions mba 8473
TRANSCRIPT
ER Modeling Practice Exercise Solutions
MBA 8473
PROBLEM 1. (This is just one way of doing this problem. Other versions are possible depending on what assumptions you make).
ASSUMPTIONS:
(It will be beneficial to think about what a ‘car’ means in this situation. Is it a car? Or, is it a sold-car? Etc.)1. VIN# provides unique identification2. Year of make can be found from VIN#3. PRE-OWNED is a yes/no attribute
1. MODEL-TYPE is unique2. We are going to capture only the latest
recall info3. Etc. etc.
ENTITIES:
CARVIN#ARRIVAL-
DATEDEALER-PRICEPRE-OWNEDSELL-TIME-
STAMP...MODEL
MODEL-TYPESTART-DATELAST RECALL...
1. We do not want to use ss# as unique identifier2. To be a customer in the database the person
should have bought at least one car.Etc etc.
CUSTOMERCUSTOMER-ID-NUMBERCUST1-F-NAMECUST1-L-NAME…
PROBLEM 1 continued:
ER Model
bought
MODEL
Has aRelationship related assumptions:1. One customer can buy many cars over time2. A car can be bought by one customer only3. To be a customer one has to buy a car4. A car can have only one model5. Etc. Etc.
CUSTOMER SOLD-CAR0Is bought by
Can belong to
PROBLEM 2.Note that the ERD solution for problem 1 can meet most of the requirements of problem 2 except the fact that we do not need model info for problem 2.Only kink in this problem was the use of USED-CARS and NEW-CARS. In this particular case it is convenient to capture that as an attribute called PRE-OWNED (yes/no) like I already did for problem 1.Another way to treat this in the ERD will be to recognize two sub-type entities viz., USED-CARAnd NEW-CAR for a super entity called CAR. Can be done like this:
CAR
USED-CAR NEW-CAR
Is a
PROBLEM 3. (This is just one way of doing this problem. Other versions are possible depending onwhat assumptions you make). Partial solution only.
ENTITIES:
CUSTOMER
SOFTWARE
SOFTWARE-TYPE
BETA-STAGE (all beta-stage types may not be used at a given point of time)
SALES-AGENT
PROMOTION
(PROMOTION-TYPE+DATE is unique identifier)
Hints for the relationships:
Customer and Software – zero/many to zero/many
Software-type and Beta-stage – one to one (assumption: a given software type can only be in a one beta)
Customer and Sales-agent – (many to one) See P&G example from class notes.
Promotions (are sent to ) Customers – Many to many.
You should be able to fill the rest from this!
SOFTWARE and SOFTWARETYPE – one/one to one/one
PROBLEM 3 continued:
ER Model
Can buyCUSTOMER SOFTWARE0 SOFTWARE-TYPE
PROMOTIONSSALES-AGENT BETA-STAGE
0Was a
Receives Can be in a
0
0
Is assigned to