Question: 1 . Based on the E - R model provided above, please design the relations ( tables ) accordingly. Clearly define your table name, data

1. Based on the E-R model provided above, please design the relations (tables) accordingly. Clearly define your table name, data fields, and primary keys. Also, please specify the relationship between the tables (foreign key vs. primary key).
E.g., MD (SSN, Attribute 2, Attribute 3...)
2. For this question, you will need to use MySQL. Please write the SQL command to create tables you identified in question 1 in MySQL.
E.g., create table tbldummy (ID Integer, ...PRIMARY KEY(ID), FOREIGN KEY (...)REFERENCES ...);
3. For this question, you will need to use MySQL. Due to the availability and sensitivity of the data, we are only able to provide partial (but most important and relevant) information in four excel spreadsheets (see attached). Please use the information provided in the excel to insert the data into the tables. Note for the missing information, you can use dummy data.
4. For this question, you will need to use MySQL. Please write the SQL commands for the following queries. (Run the commands and submit the screenshots of your query results)
The manager is interested in the patient composition. Please create query to get the # of IP (inpatient) exams and the # of OP (outpatient) exams.
The manager is also interested in the number of exams conducted after working hours. So please create query to get the # of exams done after 5pm per room (IR Room 1, IR Room 2 and IR Room 3)
The third question is the exam duration. For each of the three rooms, please get the Average, Min, and Max exam durations.
The fourth question is related to specialty. The manager is interested in the number of exams from each specialty. Please write the query to get the number of exams in each specialty (heart failure, cardiovascular in short Card, IR, Neuro interventional, Vascular surgery, Neuro Surgery, Eletro psychologiy). Note you will need to get information gathered from multiple tables.
The manager is now interested in the room allocated for IR specialty only. The last question is please get the # of IR specialty exams in each room.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!