Hospital tables Assignment ITDR2106-21SP Assignment #1  Create tables based on the below given relational model.  Define your own data type to the attributes and apply your own constraints to the attributes  Identify the primary, foreign keys apply it to the attributes.  Populate the data in all the tables using SQL commands/queries. Hospital tables: patients (patient-id, name, insurance, date-admitted, date-checked-out) doctors (doctor-id, name, specialization) test (testid, testname, date, time, result) doctor-patient (patient-id, doctor-id) test-log (testid, patient-id) performed-by (testid, doctor-id) Assignment #2 Function:  Create a function which accepts patient id and display the patients name, date admitted. Sample output is: The patient name is Maryam, she got admitted on 12-Feb-2020 Procedure Write a Procedure that accepts patient id and display the patient id, name, test name and result. Package  Create a package which contains the above created procedure in the specification.  Create package body of the above given procedure. And finally call the procedure created above by passing the patient id then display the output as shown below: Sample output: Patient id is: P0232 Patient Name is: Ms Marwa Al Battashi Test Taken: X-Ray Result: Negative Assignment #3  Create a row level trigger which insert a tuple into the patients_audit (patient-id, name, date-admitted, doctor-id) table whenever a record is added to the patient and doctors table.  Draw an ERD diagram for the above tables with appropriate entities, attributes, constraints, participants, relationships using any online tool such as draw.io

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter13: Views
Section: Chapter Questions
Problem 1MC
icon
Related questions
Question
100%
Hospital tables Assignment ITDR2106-21SP Assignment #1  Create tables based on the below given relational model.  Define your own data type to the attributes and apply your own constraints to the attributes  Identify the primary, foreign keys apply it to the attributes.  Populate the data in all the tables using SQL commands/queries. Hospital tables: patients (patient-id, name, insurance, date-admitted, date-checked-out) doctors (doctor-id, name, specialization) test (testid, testname, date, time, result) doctor-patient (patient-id, doctor-id) test-log (testid, patient-id) performed-by (testid, doctor-id) Assignment #2 Function:  Create a function which accepts patient id and display the patients name, date admitted. Sample output is: The patient name is Maryam, she got admitted on 12-Feb-2020 Procedure Write a Procedure that accepts patient id and display the patient id, name, test name and result. Package  Create a package which contains the above created procedure in the specification.  Create package body of the above given procedure. And finally call the procedure created above by passing the patient id then display the output as shown below: Sample output: Patient id is: P0232 Patient Name is: Ms Marwa Al Battashi Test Taken: X-Ray Result: Negative Assignment #3  Create a row level trigger which insert a tuple into the patients_audit (patient-id, name, date-admitted, doctor-id) table whenever a record is added to the patient and doctors table.  Draw an ERD diagram for the above tables with appropriate entities, attributes, constraints, participants, relationships using any online tool such as draw.io
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
SQL Query
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
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning