database design

User Generated

snant2

Computer Science

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

Database Management System (COSC 359) Last Name: First Name: 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. ID Name Address Phone 1 ABC 123 Able st. Balt MD 22180 123-456-7890 2 XYZ 120 Maple st. Balt MD 22180 123-456-7890 1 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’; 2 9- (10 points) Draw the relational schema for ER diagram of your term project. 3
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

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...


Anonymous
Goes above and beyond expectations!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Content

Related Tags