Answered step by step
Verified Expert Solution
Link Copied!

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:

  1. An SQL file (i.e. save the file with file extension .sql) containing the SQL written to perform the tasks.
  2. An exported SQL file using MySQL Workbench Data Export option.
  3. An ER Diagram generated by MySQL Workbench.

Assignment Scope

  1. Use database hospital.
  2. Alter tables in the database.
  3. Create new tables.
  4. Insert rows into tables.

To access the database:

  1. Launch the MySQL Command Line Client executable or MySQL Workbench
  2. Login in using the password set during installation

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 15th International Conference Dasfaa 2010 International Workshops Gdm Benchmarx Mcis Snsmw Diew Udm Tsukuba Japan April 2010 Revised Selected Papers Lncs 6193

Authors: Masatoshi Yoshikawa ,Xiaofeng Meng ,Takayuki Yumoto ,Qiang Ma ,Lifeng Sun ,Chiemi Watanabe

2010th Edition

3642145884, 978-3642145889

More Books

Students also viewed these Databases questions

Question

8. Do the organizations fringe benefits reflect diversity?

Answered: 1 week ago

Question

7. Do the organizations social activities reflect diversity?

Answered: 1 week ago