Question: Develop an ER diagram that captures your data model. Show the correct cardinality for relationships and identity primary keys for all entities. Document any constraints

Develop an ER diagram that captures your data model. Show the correct cardinality for relationships and identity primary keys for all entities. Document any constraints not captured in the ER diagram. Think about primary keys and whether you want to use a natural primary key made up of one or more attributes, or use an artificial surrogate key that is automatically generated by the database and will be unique.

Use Crows foot style in showing the cardinality of relationships.| Distinguish primary and foreign keys in your diagram from regular attributes. You can do this by underlining, color or other icons. Explain how the entities, attributes and relationships of your design address the requirements. Thank you!

- Each patient has an identifying SSN, plus a name, age, and address. - Doctors also have an identifying SSN. Additionally, each doctor has a name, a specialty, and years of experience. - Each pharmaceutical company is identified by name and has a phone number. - Each drug has a trade name and a generic formula. Each drug is sold by a given pharmaceutical company, and the trade name identifies a drug uniquely. - Each pharmacy has a name, address, and phone number. - Every patient has a primary physician. - Any physician can write a prescription for any patient. - Each pharmacy sells several drugs and has a price for each. A drug could be sold at several pharmacies and the price could vary from one pharmacy to another. - Doctors prescribe drugs for patients. A prescription has a unique RX number and is for one drug, one patient and is written by one doctor. A patient can have multiple prescriptions from multiple doctors. - Each prescription has a date and a quantity associated with it. - When a prescription is filled, we want to track the pharmacy that filled it and the date that it was filled. - Pharmaceutical companies have long-term contracts with pharmacies. A pharmaceutical company can contract with several pharmacies, and a pharmacy can contract with several pharmaceutical companies. For each contract, we want to record the start date, an end date, and the text of the contract. -Pharmacies appoint a supervisor for each contract. Every contract has a supervisor that can change over time. A supervisor may be a supervisor for multiple contracts.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!