Description
Database Management System (COSC 359)
Given the following ER diagram (Crows Feet notation)
1- (10 points) Draw the relational schema (table Design) for the above ER diagram.
2- (6 points) Write a SQL statement to add the above Employee table to the database.
3- (2 points) Write the SQL statement which drops the above Employee table from the database.
4- (4 points) Write the SQL statement which alter the Employee table by adding phone column.
5- (6 points) Write the SQL statement(s) to insert the following data into the Employee table.
IDNameAddressPhone
1ABC123 Able st. Balt MD 22180123-456-7890
2XYZ120 Maple st. Balt MD 22180123-456-7890
6- (4 points) Write the SQL statement to update the phone for name ‘ABC’ to ‘410-123-4567’ in the Employee table.
7- (4 points) Write a SQL statement that will select all columns from the Employee table.
8- (4 points) Write a SQL statement that will select all columns from employee table where name is XYZ.
9- (4 points) What is the result of the following SQL statement?
select ID, phone
from Employee
Where name = ‘ABC’
or name = ‘XYZ’;
9- (10 points) Draw the relational schema for ER diagram of your term project.
Unformatted Attachment Preview
Purchase answer to see full attachment
Explanation & Answer
Hello,Here's the solution.There are some problems in the assignment file:1. In ER Diagram, one of the attributes is named as 'Employee_ID' but in Question 9, it has been referred to as 'ID'.So i used the attribute name as 'ID' and not 'Employee_ID'. Ideally the names should be same everywhere.2. Same as above, in 5th question, the phone attribute is named as 'Phone' in the table but the same attribute has been referred to as 'phone' in 9th question ('P' capit...