SQL to Relational Algebra
16:25 20 Jun 2010

How do I go about writing the relational algebra for this SQL query?

Select patient.name, 
       patient.ward, 
       medicine.name, 
       prescription.quantity, 
       prescription.frequency
From patient, medicine, prescription
Where prescription.frequency = "3perday" 
  AND prescription.end-date="08-06-2010" 
  AND canceled = "Y"
prescription(prescription-ref, patient-ref, medicine-ref,
    quantity, frequency, end-date, canceled)
medicine(medicine-ref, name)
patient(Patient-ref, name, ward)
sql relational-algebra