Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following relational database schema- Doctor(SSN,FirstName,LastName,Speciality,YearsOfExperience,PhoneNum) Patient(SSN,FirstName,LastName,Address,DOB,PrimaryDoctor_SSN) Medicine(TradeName,UnitPrice,GenericFlag) Prescription(Id,Date,Doctor_SSN,Patient_SSN) Prescription_Medicine(Prescription_Id,Trade_Name,NumOfUnits) Write Relational Algebra expression for the following: List the first and last name of

Consider the following relational database schema-

Doctor(SSN,FirstName,LastName,Speciality,YearsOfExperience,PhoneNum)

Patient(SSN,FirstName,LastName,Address,DOB,PrimaryDoctor_SSN)

Medicine(TradeName,UnitPrice,GenericFlag)

Prescription(Id,Date,Doctor_SSN,Patient_SSN)

Prescription_Medicine(Prescription_Id,Trade_Name,NumOfUnits)

Write Relational Algebra expression for the following:

List the first and last name of patients whose primary doctor named Rahul kumar

List the first and last name of doctors who are not primary doctors of any patient

List the first and last name of patients who have no prescription written by doctors other than the primary doctors

List the trade name of generic medicine with unit price greater than Rs. 50

List the SSN of Patients who have Disprin prescriped to them by doctor name Suresh Verma

find average YearsofExperience based on Speciality of doctors

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

Principles Of Database Systems With Internet And Java Applications

Authors: Greg Riccardi

1st Edition

020161247X, 978-0201612479

More Books

Students also viewed these Databases questions