ERD Cases -- Draw an ERD for Each

advertisement
ERD Cases -- Draw an ERD for Each
1 Joe's Pharmacy
A customer comes in with a prescription to be filled. The prescription contains the date,
the patient's name, the physician's name and ID number, the drug name, dose, quantity to
be dispensed, and instructions for taking the drug. The pharmacy assigns a prescription
number. The pharmacist checks to see whether there is a record on hand for that
customer, and if not a new record is created with the customer’s name, address, phone
number, date of birth and any known drug allergies. If there is a record the pharmacist
checks to see whether the new medication is contraindicated based on the information in
the customer's record. If not the pharmacist checks to make certain that there is adequate
stock on hand and then fills the prescription, provides it to the customer, and updates the
customer’s record.
Some simplifications: Assume that there is only one pharmacist (Joe.) Assume that a
separate perscription is written for each separate drug to be dispensed. Assume that when
we are talking about a drug alergy that each alergy involves only one drug (i.e. we are not
looking at drug interactions.)
2) The TRY yogurt company makes and sells many products. Each product is composed
of several raw ingredients that are supplied by various vendors. A particular ingredient is
always supplied by the same vendor; however a vendor may supply more than one
ingredient. The product line is divided up so that only one department is responsible for
making a particular product. However each department is responsible for more than one
product. Each manager manages exactly one department. The following data fields must
be stored in the TRY yogurt Company's database; product number, product name,
ingredient number, ingredient name, quantity of the ingredient required for each product,
vendor ID, vendor name, vendor address, employee ID of the manager, manager's name,
Department ID code, department name, department office address, department phone
number.
Download