Question: DATA SCIENCE!!!!!!!! Problem 1 Assume that The Queen Anne Curiosity Shop designs a database with the following tables CUSTOMER(CustomerID,LastName,FirstName,City,Phone) VENDOR (VendorID, CompanyName, ContactLastName, ContactFirstName,City,Email) ITEM(ItemID,ItemDescription,PurchaseDate,
DATA SCIENCE!!!!!!!!


Problem 1 Assume that The Queen Anne Curiosity Shop designs a database with the following tables CUSTOMER(CustomerID,LastName,FirstName,City,Phone) VENDOR (VendorID, CompanyName, ContactLastName, ContactFirstName,City,Email) ITEM(ItemID,ItemDescription,PurchaseDate, ItemCost, VendorID) SALE (SaleID, CustomerID,ItemID,SaleDate,SubTotal,Tax,Total) The referential integrity constraints are VendorID in ITEM must exist in VendorID in VENDOR CustomerID in SALE must exist in CustomerID in CUSTOMER ItemID in SALE must exist in ItemID in ITEM Assume that CustomerID of cuSTOMER, ItemID of ITEM, and SaleID of SALE are all surrogate keys starting at 1, incrementing by 1. Write SQL statements and answer questions for this database as follows 1. Write SQL CREATE TABLE statements for each of these tables. (60 points) (a) Make your own assumptions regarding cascading deletions/updates (b) See data samples in Question 2 to determine whether an attribute should be NULL or NOT NULL (c) For data types, refer to our sample SQL in slides 2. Write SQL statements to insert following data to each table. Make sure you insert the complete and exactly the same data as shown in the following tables. (40 points) Table 1: CUSTOMER CustomerID | LastNameFirstName City Phone 11ShireRobert Seattle 206-524-2433 Seattle206-524-3544 Bellevue425-635-9788 3 Bancroft Chris Table 2: VENDOR VendorID ContactLastNaeontactFirstName CompanyName Linens and Things European Specialties City Seattle Seattle ema1 Huntington Tadema Lee Smith latbusiness.com Anne Ken Andrew Mark esbusiness.com 3 Kirklanandrew.leeQsomewhere.com 4 New York Brokerage Seattle nybabusiness.conm
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
