Kindly use the hospital relational schema provided below to solve these questions.   2. List Registration numbers of all patients in H02, ward W18 who have been diagnosed with  "Flu" but for whom "Chest X-ray" test has not been ordered. a) First get a table with only one column RegistrationNumber, which lists all patients   from W18 of H02 who have been diagnosed with flu. b) Second, get a table with only one column RegistrationNumber, which lists all patients   from W18 of H02 who have had a test with Tname="Chest X-ray". c) Finally, take the set difference.

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter6: Managing Multiple Worksheets And Workbooks
Section: Chapter Questions
Problem 16RA
icon
Related questions
icon
Concept explainers
Question

Kindly use the hospital relational schema provided below to solve these questions.

 

2. List Registration numbers of all patients in H02, ward W18 who have been diagnosed with 
"Flu" but for whom "Chest X-ray" test has not been ordered.
a) First get a table with only one column RegistrationNumber, which lists all patients 
 from W18 of H02 who have been diagnosed with flu.
b) Second, get a table with only one column RegistrationNumber, which lists all patients 
 from W18 of H02 who have had a test with Tname="Chest X-ray".
c) Finally, take the set difference.

HN - Hospital Network Relational Schema
HOSPITAL(Hid, Hname, Street, City, ZIP, State, Phone)
Hname - candidate key
Street, City, ZIP - candidate key
Phone - candidate key
WARD(Hid, Wid, Wname, Beds)
# Unlike in the ER diagram that was given earlier,
# this assumes that Wid does not identify a ward unless we know the hospital.
Hid, Wname - candiate key
Hid - foreign key of HOSPITAL
EMPLOYEE(Eid, Fname, MI, Lname, Duty, Shift, Hid, Wid)
Hid, Wid - foreign key of WARD
DOCTOR(Eid, Dnumber, Spacialization)
Eid - foreign key of EMPLOYEE
PATIENT(RegistrNumber, Fname, MI, Lname, DOB, Street, City, ZIP, State, Sex, Allergies, Hid, Wid,
BedNumber)
Street, City, ZIP - candidate key
Hid, Wid - foreign key of WARD
DIAGNOSIS(Did, Dname)
Dname - candidate key
TREATMENT(RegistrationNumber, DoctorEid, Did, DiagStateent, Complications, Treatment)
RegistrationNumber - foreign key of PATIENT
DoctorEid - foreign key of EMPLOYEE
Did - foreign key of DIAGNOSIS
TEST(Tid, Type, Tname)
Tname - candidate key
ORDERED_TESTS(PatientRegistrationNumber, Tid, date, time, specimenNumber, status, results)
PatientRegistrationNumber - foreign key of PATIENT
Tid - foreign key of TEST
LAB(Lid, Lname, Street, City, ZIP, State, Phone)
Street, City, ZIP - candidate key
Phone - candidate key
LAB_TEST(Lid, Tid)
Lid - foreign key of LAB
Tid - foreign key of TEST
CONTRACTS(Lid, Hid)
Lid - foreign key of LAB
Hid - foreign key of HOSPITAL
Transcribed Image Text:HN - Hospital Network Relational Schema HOSPITAL(Hid, Hname, Street, City, ZIP, State, Phone) Hname - candidate key Street, City, ZIP - candidate key Phone - candidate key WARD(Hid, Wid, Wname, Beds) # Unlike in the ER diagram that was given earlier, # this assumes that Wid does not identify a ward unless we know the hospital. Hid, Wname - candiate key Hid - foreign key of HOSPITAL EMPLOYEE(Eid, Fname, MI, Lname, Duty, Shift, Hid, Wid) Hid, Wid - foreign key of WARD DOCTOR(Eid, Dnumber, Spacialization) Eid - foreign key of EMPLOYEE PATIENT(RegistrNumber, Fname, MI, Lname, DOB, Street, City, ZIP, State, Sex, Allergies, Hid, Wid, BedNumber) Street, City, ZIP - candidate key Hid, Wid - foreign key of WARD DIAGNOSIS(Did, Dname) Dname - candidate key TREATMENT(RegistrationNumber, DoctorEid, Did, DiagStateent, Complications, Treatment) RegistrationNumber - foreign key of PATIENT DoctorEid - foreign key of EMPLOYEE Did - foreign key of DIAGNOSIS TEST(Tid, Type, Tname) Tname - candidate key ORDERED_TESTS(PatientRegistrationNumber, Tid, date, time, specimenNumber, status, results) PatientRegistrationNumber - foreign key of PATIENT Tid - foreign key of TEST LAB(Lid, Lname, Street, City, ZIP, State, Phone) Street, City, ZIP - candidate key Phone - candidate key LAB_TEST(Lid, Tid) Lid - foreign key of LAB Tid - foreign key of TEST CONTRACTS(Lid, Hid) Lid - foreign key of LAB Hid - foreign key of HOSPITAL
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage