Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

(1) Draw an E-R diagram for the database described above. Be sure to indicate the primary key, the mapping cardinalities, and the participation constraints. If you need to make any extra assumptions, please state these assumptions!

(2) Convert the E-R diagram into relations. Indicate the name of each relation, the attributes in each relation, and the primary key. Use the format relation_name(attribute1, attribute2, ).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 2 Lncs 13427

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124251, 978-3031124259

Students also viewed these Databases questions