subject
Computers and Technology, 10.05.2021 19:40 Jasten

Problem statement. Your consulting company has been asked to develop a relational database design for a growing drug store chain. You gather the following information: 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 a number of years of experience.
Each pharmaceutical company is identified by name and has a phone number. Each drug has a trade name and a formula.
Each drug is sold by a given pharmaceutical company, and the trade name identifies a drug uniquely from among the products of that company. If a pharmaceutical company is deleted, you need not keep track of its products any longer.
Each pharmacy has a name, address, and phone number.
Every patient has a primary physician. Every doctor has at least one 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 doctor could prescribe one or more drugs for several patients, and a patient could obtain prescriptions from several doctors.
Each prescription has a date and a quantity associated with it. You can assume that, if a doctor prescribes the same drug for the same patient more than once, only the last such prescription needs to be stored.
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, 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, but the contract supervisor can change over the lifetime of the contract.
1. Develop an ER diagram that captures the conceptual model. Show all detail in the ER diagram, such as the mapping cardinalities. Identify any constraints not captured in the ER diagram. I suggest you follow the method for developing an ER diagram we covered in class (start with entity sets, etc.)
2. Map the ER diagram to a relational database schema, using the procedure we have learned in class. Write down the database schema.
3. Normalize your relational schema using the procedure we learned in class. As a first step, document any functional dependencies that would indicate the need for normalization. Note that you are not required to normalize, but if your tables are not in BCNF or 3NF then you should explain why you did not normalize. The final relational schema must be documented in SQL using create table statements.
4. Think of at least 5 questions about the data that would be interesting to management of the drug store chain. Write each of them in SQL. Do not use only questions that are simple to express in SQL. The questions should use grouping, joins and/or subselects.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 16:00
Create a logic array qualifyingindex with true for any location where the runner is male with a running time less than 8.2. row array runnergenders indicate if a runner if male (m) or female ( f. row array runnertimes indicates the corresponding runner's time.
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
What does 21 pilots middle aged name as a band 15 years prior to them naming their band 21 pilots?
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
This graph compares the cost of room and board at educational institutions in texas.
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
Which best compares appointments and events in outlook 2010appointments have a subject man, and events do notappointments have a specific date or range of dates, and events do notappointments have a start and end time of day, and events do notappointments have a location option, and events do not
Answers: 2
You know the right answer?
Problem statement. Your consulting company has been asked to develop a relational database design fo...
Questions
question
Mathematics, 14.04.2021 22:50
question
Mathematics, 14.04.2021 22:50
question
English, 14.04.2021 22:50
Questions on the website: 13722361