Answered step by step
Verified Expert Solution
Question
1 Approved Answer
To complete this assignment, submit the following three files to Webcourses: An SQL file (i.e. save the file with file extension .sql) containing the SQL
To complete this assignment, submit the following three files to Webcourses:
- An SQL file (i.e. save the file with file extension .sql) containing the SQL written to perform the tasks.
- An exported SQL file using MySQL Workbench Data Export option.
- An ER Diagram generated by MySQL Workbench.
Assignment Scope
- Use database hospital.
- Alter tables in the database.
- Create new tables.
- Insert rows into tables.
To access the database:
- Launch the MySQL Command Line Client executable or MySQL Workbench
- Login in using the password set during installation
Tasks Description 1. Alter table physician so that column ssn is unique. 2. Alter table nurse so that column ssn is unique. | 3. Alter table insurance so that column company Name is unique. 4. Alter table medicalProcedure so that column name is unique. 5. Alter table medication so that column name is unique. 6. Alter table position so that column title is unique. | 7. Alter table roomType so that column roomDesc is unique. 8. Insert data into table position. 9. Insert data into table physician. 10. Create table named department with the following attributes, data types, and constraints: a. ID, integer, not null, auto increment b. name, variable character, 50 characters, not null c. head, integer, not null d. primary key is column ID e. foreign key is column head, references table physician, column employeeld 11. Insert data into table department. 12. Create table named onCall with the following attributes, data types, and constraints: f. ID, integer, not null, auto increment g. nurse, integer, not null h. blockFloor, integer, not null i. blockCode, integer, not null j. startDateTime, timestamp, not null k. endDateTime, timestamp, not null 1. primary key is column ID m. foreign key is column nurse, references table nurse, column employeeld 13. Insert data into table on Call
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started