Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

You might find another post with the same table but this is asking for a different query. Thanks! Max Score: 75 This table has information

You might find another post with the same table but this is asking for a different query. Thanks! image text in transcribed
image text in transcribed
Max Score: 75 This table has information on all current prescriptions P- Prescription Table- Field Name Field Type Description Dru SSNum NumDays TabDay Name of the Drug/Tablet Social Security Number of Patient Number of Days the patient has to take the tablet for Char Char Numeric Numeri c Number of tablets to be taken each day by the patient Sample Table SSNum 123-56-9876 123-56-9876 234-56-7890 345-67-8901 NumDays 15 TabDay Drug Prozac Asprin Terramycin 10 Prozac D- Drug Table - This table has information on all available dru Field Name Tablet Manu UP Reaction Field Type Description Char Name of the Drug/Tablet Char Numeric Unit Price per tablet for the drug Char Name of the manufacturer of the drug Name of a drug that can NOT be taken along with the current drug. Sample Table Tablet Prozac Terramycn Manu Abbot Pfizer Baxter Abbot UP Reaction 6.75 2.75 Asprin 0.35 Terramycin 1.05 Imodium C- Customers/patients Table- This table has information on all customers/patients Field Name Field Type Description Name Char Char Name of the customer/patient Social security number SSNum DOB Numeric Date of Birth Char City in which the person live ity Sample Table Name John Doe Paula Smith Peter Green Sally Blue Note: DOB City 05/23/1960 Chicago 12/07/1970 River Forest 01/31/1980 Oak Park 07/07/1998 Chicago SSNum 123-56-9876 234-56-7890 345-67-8901 456-78-9012 These tables are only samples. The actual tables can have a lot more records in the The queries you write should always work, regardless of the data currently in the ta bles Q1) Write an SQL query to find what drugs can NOT be prescribed for Jill Smith, based on her current prescriptions and the reaction they have with other drugs. Q2) Write a relation algebra query to list out the names of the Chicago residents who currently have no prescriptions. The query should also list out the date of birth of these patients. Q3) Write an SQL query to list out the patient name and the total cost of prescription drugs used by the patient, for each patient from River Forest. Q4) Write an SQL query to find the name and month of birth (example April) of the youngest patient taking Prozac. Q5) The Federal Drug Administration has decided that all drugs made by Abbot that are taken by patients under 18 have side effects if they are taken for more than a week. Therefore all prescriptions for products made by Abbot that are taken by patients under 18 have a new limit as K9> to how long they can be prescribed for (a week). Write an SQL query to change the database to take care of this FDA regulation

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_2

Step: 3

blur-text-image_3

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 Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

More Books

Students explore these related Databases questions

Question

Discuss the various types of policies ?

Answered: 3 weeks ago