Question
A database stores information about patients, doctors, prescriptions, drugs, pharmacy, and pharmaceutical company. The information stored about patients includes SSN, name, date of birth, gender,
A database stores information about patients, doctors, prescriptions, drugs, pharmacy, and pharmaceutical company. The information stored about patients includes SSN, name, date of birth, gender, and address. The information stored about doctors includes ID, name, and speciality. The information stored about drugs includes trade-name and description. The information stored about pharmacy includes pharmacy ID, name, phone number, and address. The information stored about pharmaceutical company includes brand name, address and phone number. Each patient has one primary doctor. Every doctor has at least one patient. Doctors prescribe drugs for patients. A doctor could prescribe one or more drugs to the patient, and a patient could obtain prescriptions from several doctors. Each prescription has a date and quantity associated with it. Each pharmacy sells drugs and has a price for each drug. A drug could be sold at several pharmacies and the price could vary from one pharmacy to another. Each drug is made by a unique pharmaceutical company. The trade-name of a drug is unique among the products of the same company, but different companies may have products (drugs) with the same trade-name. Assume brand name for each pharmaceutical company is unique.
Draw an E-R diagram for the database described above. Be sure to indicate the primary key, the mapping cardinalities, and the participation constraints.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started