Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help on this question. Please provide the solution with clear explainations. Thank you! 1. A chain of pharmacy stores has asked you to

I need help on this question. Please provide the solution with clear explainations. Thank you!

image text in transcribed

1. A chain of pharmacy stores has asked you to design its database. Here's the information that you gather: Patients are identified by their SSN. For each patient, the name, address, and age must be recorded Doctors are identified by their SSN. For each doctor, the name, specialty, and years of experience must be recorded Each clinic is identified by its name and the city it is in. A clinic's name is assumed to be unique within the city Doctors work for clinics. Each doctor should be associated with at least one clinic. Every patient has one primary physician. Every doctor has at least one patient. Each drug company is identified by name and has a phone number For each drug, the name and formula must be recorded. Each drug is made by a given drug company, and the drug name identifies a drug uniquely among the products of that company. If a drug company is deleted, you need not keep track of its products any longer Each pharmacy has a unique name and has a phone number. A pharmacy can either be an in-store pharmacy (which has an address) or an online pharmacy (which has a webURL) 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 write prescriptions for patients. A doctor can write prescriptions for many patients and a patient could obtain prescriptions from several doctors. A doctor could prescribe one or more drugs in a prescription. Each prescription has a prescription number and a date associated with it. Each prescription is given to the patient in a certain clinic and the prescription number is unique within the clinic it is given. Drug companies have long-term contracts with in-store pharmacies. A drug company can have contracts with several in-store pharmacies, and an in-store pharmacy can have contracts with several drug companies. For each contract, you have to store a start date, an end date, and the text of the contract. Pharmacies appoint a supervisor for each contract. There must always be a supervisor for each contract. Questions a) (85pts) Draw an ER diagram for the pharmacy database. Make sure that your design captures all of implications of the business model, including: all of the relevant entities and their attributes, including keys; all the relevant relationships and associated attributes, appropriate key constraints for the relationships, and appropriate participation constraints for the relationships. - - b) (10pts) How would your design change if each drug must be sold at a fixed price by all pharmacies? 1. A chain of pharmacy stores has asked you to design its database. Here's the information that you gather: Patients are identified by their SSN. For each patient, the name, address, and age must be recorded Doctors are identified by their SSN. For each doctor, the name, specialty, and years of experience must be recorded Each clinic is identified by its name and the city it is in. A clinic's name is assumed to be unique within the city Doctors work for clinics. Each doctor should be associated with at least one clinic. Every patient has one primary physician. Every doctor has at least one patient. Each drug company is identified by name and has a phone number For each drug, the name and formula must be recorded. Each drug is made by a given drug company, and the drug name identifies a drug uniquely among the products of that company. If a drug company is deleted, you need not keep track of its products any longer Each pharmacy has a unique name and has a phone number. A pharmacy can either be an in-store pharmacy (which has an address) or an online pharmacy (which has a webURL) 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 write prescriptions for patients. A doctor can write prescriptions for many patients and a patient could obtain prescriptions from several doctors. A doctor could prescribe one or more drugs in a prescription. Each prescription has a prescription number and a date associated with it. Each prescription is given to the patient in a certain clinic and the prescription number is unique within the clinic it is given. Drug companies have long-term contracts with in-store pharmacies. A drug company can have contracts with several in-store pharmacies, and an in-store pharmacy can have contracts with several drug companies. For each contract, you have to store a start date, an end date, and the text of the contract. Pharmacies appoint a supervisor for each contract. There must always be a supervisor for each contract. Questions a) (85pts) Draw an ER diagram for the pharmacy database. Make sure that your design captures all of implications of the business model, including: all of the relevant entities and their attributes, including keys; all the relevant relationships and associated attributes, appropriate key constraints for the relationships, and appropriate participation constraints for the relationships. - - b) (10pts) How would your design change if each drug must be sold at a fixed price by all pharmacies

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

Ai And The Lottery Defying Odds With Intelligent Prediction

Authors: Gary Covella Ph D

1st Edition

B0CND1ZB98, 979-8223302568

More Books

Students also viewed these Databases questions

Question

Evaluate the importance of diversity in the workforce.

Answered: 1 week ago

Question

Identify the legal standards of the recruitment process.

Answered: 1 week ago