The entity relationship diagram below models the components of a database belonging to TrueHealth, a network of medical centers. The database allows TrueHealth to keep track of doctors at each...


The entity relationship diagram below models the components of a database belonging to<br>TrueHealth, a network of medical centers. The database allows TrueHealth to keep track<br>of doctors at each practice and their patients.<br>Patient<br>PK Pat ID<br>Consultation<br>Doctor<br>PK,FK1 Doc_ID<br>PK Doc ID<br>1..1<br>0..<br>1..1<br>Pat_Name<br>PK, FK2 Pat ID<br>Doc_Name<br>Pat Age<br>Con_Date<br>Doc_EmployDate<br>Pat_Gender<br>FK Prc_ID<br>0..*<br>1..1<br>Practice<br>PK Prc ID<br>Prc_Name<br>Prc_YearEstablished<br>Prc_Province<br>Write SQL statements for the following:<br>Create all the necessary tables. Name the tables; and all their attributes<br>appropriately.<br>Insert TWO records into each of the tables created to demonstrate that you<br>have created them correctly.<br>List all the TrueHealth practices based in Gauteng.<br>List, in alphabetical order, the names of all patients who had consultations<br>after 01 January 2018.<br>Which practice (by name) has the most recent hire (i.e. doctor with latest<br>employment date)?<br>Which doctor has had the least number of consultations? Give the doctor's<br>name and the number of consultation s/he has given.<br>6.1<br>6.2<br>6.1<br>6.2<br>6.3<br>6.4<br>

Extracted text: The entity relationship diagram below models the components of a database belonging to TrueHealth, a network of medical centers. The database allows TrueHealth to keep track of doctors at each practice and their patients. Patient PK Pat ID Consultation Doctor PK,FK1 Doc_ID PK Doc ID 1..1 0.. 1..1 Pat_Name PK, FK2 Pat ID Doc_Name Pat Age Con_Date Doc_EmployDate Pat_Gender FK Prc_ID 0..* 1..1 Practice PK Prc ID Prc_Name Prc_YearEstablished Prc_Province Write SQL statements for the following: Create all the necessary tables. Name the tables; and all their attributes appropriately. Insert TWO records into each of the tables created to demonstrate that you have created them correctly. List all the TrueHealth practices based in Gauteng. List, in alphabetical order, the names of all patients who had consultations after 01 January 2018. Which practice (by name) has the most recent hire (i.e. doctor with latest employment date)? Which doctor has had the least number of consultations? Give the doctor's name and the number of consultation s/he has given. 6.1 6.2 6.1 6.2 6.3 6.4

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here