Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am having trouble translating the SQL to relational algebra. Can someone assist with writing the actual symbols ? We have the information about patients

image text in transcribedimage text in transcribed

I am having trouble translating the SQL to relational algebra. Can someone assist with writing the actual symbols?

We have the information about patients in a database with the following schema Prescription (PatientID, Drug, Start, End, Physician, Diagnosis, and NewSymptom PatientID, Diagnosis, Start, End) Some Clarifications 1. In Prescription, Start is the date the patient started taking the drug, andEnd is the last date the patient took the drug. To simplify the query, assume that no dates are missing. Physician is the physician who prescribed the drug, and Diagnosis is the condition for which the physician prescribed it. (Assume that, although a drug may be prescribed for multiple conditions, when a physician prescribes a drug for a patient (s)he prescribes it because of a single condition.) 2. NewSymptom stores problems that patients have developed that apparently might be side effects of medications. Diagnosis is the physician's description of the apparent side effect. Start and End are the starting and ending dates of the symptom. Again, assume End is never blank. 3. Assume dates are stored as integers, so that larger integers correspond to later dates. (One commonway is what's called a Julian Date [nothing to do with Julius Caesar where we might store today's date as 2012094 today is the 94th day of 2012. But all you need care about is that the dates are in the right order.)

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

MySQL/PHP Database Applications

Authors: Jay Greenspan, Brad Bulger

1st Edition

ISBN: 978-0764535376

More Books

Students also viewed these Databases questions