Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question# 3 [15 M] Medicine (Name, Cost, Universal) Doctor (Registered_ID, Fname, Lname, Area_of_expertise, Experience_years, Clinic_address, Contact_num) Patient (CNIC, Fname, Lname, Date_of_birth, Gender, Address, Primary_Doctor_reg_ID) Prescription

image text in transcribed

image text in transcribed

Question# 3 [15 M] Medicine (Name, Cost, Universal) Doctor (Registered_ID, Fname, Lname, Area_of_expertise, Experience_years, Clinic_address, Contact_num) Patient (CNIC, Fname, Lname, Date_of_birth, Gender, Address, Primary_Doctor_reg_ID) Prescription (Serial_no, Date, Doctor_reg_ID, Patient_CNIC) Prescription_Medicine (Prescription_Serial_No, Medicine_Name, Quantity_per_day) University of Management and Technology A) Provided the relations above, write the relational algebra expressions for the following queries: [10] 1) Considering the primary doctor's name to be "Peter Jonathan, list the first name and last name of the patients. 2) List the names of all the medicines which are universal and have price less than 150. 3) List the first name and last name for the doctors who are not primary doctors for any patient. 4) Mention the name and total quantity per day for the medicines which have been prescribed in more than 35 prescriptions. 5) Show the CNIC of the patients who have been prescribed Paracetamol and Calcium" names in one prescription. 6) List the CNIC of distinct patients who have been prescribed "Vitamin by the doctor "Henry Neuer. 7) Report the first and last name for the patients who have no prescription other than the ones written by their primary doctors. B) Write query for the following given query tree. [2.5) name, title 1 o dept_name = Music instructor teaches course C) Draw query tree for the following relational algebra expression. [2.5] T (Obid=100 rating>5 (Reserves sid=sid Sailors)) sname

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

Case Studies In Business Data Bases

Authors: James Bradley

1st Edition

0030141346, 978-0030141348

More Books

Students also viewed these Databases questions