Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started