Assignment 3
CS605
Based on the ERD associated with assignment 2 see below and it is also posted under assignment 2 along with the LDM
1. Write the SQL code i.e., CREATE statements to create the table structures for photo site database, being sure to identify both primary keys and foreign keys in each table 2 points.
2. Write the SQL code to insert 5 orders, 10 products, 3 add on products, 15 orderlines, 3 customers, 3 shipments, and 15 photos 1.5 point.
3. Write SQL code to drop a Foreign Key constraint you created in question 1 and to add it back .5 point.
4. Write the SQL code to modify the length of one of the attributes you created in question 1 .5 points.
4. Write the SQL code to remove ONE instance this is a row in the table in one of your tables .5 points.
Turn in
The code used for all 5 questions above PLEASE TURN IN CLEAN CODE DO NOT TURN IN ALL OF YOUR MISTAKES
A listing of all data in all the tables
2. Just make up values to insert into your tables
3. When you print out your data you should ONLY be showing the values you inserted into your fields.
Select from photo; will print out all values in the photo table, do this for each of your tables. You do not need to show me that you used select to print them out