{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


sqlstudyproblem2 - Queries The output schema for the query...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
ER Diagram for Patient Enterprise 1 N 1 N N M 1 N CSE 412/598 1 SQL Study Problems Nam e dateOfBirt h firstNam e lastNam e Patient accoun patientI D patient account accountI d balance responsible Party bMont h bDay bYear Patien t visit visit charge descriptio n visitDate vYea r vDay vMont h Doctor visit doctor Visit diagnosis diagnosis degreeYea r doctorID drName dCode dDescriptio n
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
WinRDBI Patient Relational Database Schema patient (patientID , lastName, firstName, bMonth, bDay, bYear, accountID) account (accountID , balance, responsibleParty) visit (patientID, vMonth, vDay, vYear , description, charge, doctorID) doctor (doctorID , drName, degreeYear) diagnosis (dCode, dDescription) visitDiagnosis (patientID, vMonth, vDay, vYear, dCode
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ) Queries The output schema for the query is given in parentheses following the query specification. 1. Which accounts have only one patient associated with it? (accountID, lastName, firstName, balance) 2. Which doctors have never made a diagnosis of ‘High blood pressure’? (doctorID, drName) 3. Which patients have had visits with the minimum visit charge? (firstName, lastName, vMonth, vDay, vYear, charge) 4. Which doctors have diagnosed all of the patients who were born in the timeframe from 1965 to 1975? (doctorID, drName, degreeYear) CSE 412/598 2 SQL Study Problems...
View Full Document

{[ snackBarMessage ]}