SQL 2008 Script Questions

Price: $15 USD

Question description

***Review Attachment.***

Provide the SQL statements required to accomplish the following tasks. In addition, include the output from the statements.

#1 (10 points) Create a database named FINAL_EXAM that you will then use for all remaining problems. CREATE DATABASE FINAL_EXAM

#2 (20 points) Create the tables and appropriate constraints based on the following ER diagram. Use appropriate data types. Note that the size column should only accept S, M, or L. In addition the price column should have values greater than zero. All columns in both tables are required. 

#3 (5 points) Insert 3 rows in the Category table. The db is for a small shoe store, so use appropriate data for the description (“Men”, “Women”, “Children”)

#4 (5 points) Insert 3 Product records for each category in the product table. Use whatever data you see as appropriate.

#5 (5 points) Use one statement to increase the price of all products in the Men category by 25%.

#6 (5 points) Use one statement to delete all products for the Children category.

#7 (10 points) Create and execute a view named EXAM_VIEW that shows all columns from both tables. Use an inner join.

#8 (10 points) Create a database trigger named EXAM_TRIGGER that prevents a user from deleting a Product record on Tuesdays. Display an appropriate error message. Make sure to show that the trigger is working properly

#9 (10 points) Create a stored procedure named SP_EXAM that will be used to insert records into the Product table. Make sure to show that the procedure is working properly.

#10 (5 points) Remove the EXAM_VIEW object from the database.

#11 (5 points) Remove the SP_EXAM stored procedure from the database.

#12 (5 points) Remove the EXAM_TRIGER database trigger from the database.

#13 (5 points) Remove the FINAL_EXAM database.

**First 2 are done. Just need the remaining 11. I'm using SQL Server 2008.**

Tutor Answer

(Top Tutor) Daniel C.
School: Boston College
Studypool has helped 1,244,100 students
Ask your homework questions. Receive quality answers!

Type your question here (or upload an image)

1826 tutors are online

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors