(Solved) : Consider Following Relational Database Schema Doctor Ssn Firstname Lastname Speciality Yea Q32239203 . . .
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 doctornamed “Rahul kumar”
List the first and last name of doctors who are not primarydoctors of any patient
List the first and last name of patients who have noprescription written by doctors other than the primary doctors
List the trade name of generic medicine with unit price greaterthan Rs. 50
List the SSN of Patients who have “Disprin” prescriped to themby doctor name “Suresh Verma”
find average YearsofExperience based on Speciality ofdoctors
Expert Answer
Answer to Consider Following Relational Database Schema Doctor Ssn Firstname Lastname Speciality Yea Q32239203 . . .
OR