subject

Assume that The Queen Anne Curiosity Shop designs a database with the following tables:CUSTOMER (CustomerID, LastName, FirstName, Address, City, State, ZIP, Phone, Email)EMPLOYEE (EmployeeID, LastName, FirstName, Phone, Email)VENDOR (VendorID, CompanyName, ContactLastName, ContactFirstName, Address, City, State, ZIP, Phone, Fax, Email)ITEM (ItemID, ItemDescription, PurchaseDate, ItemCost, ItemPrice, VendorID)SALE (SaleID, CustomerID, EmployeeID, SaleDate, SubTotal, Tax, Total)SALE_ITEM (SaleID, SaleItemID, ItemID, ItemPriceThe referential integrity constraints are:CustomerID in PURCHASE must exist in CustomerID in CUSTOMERVendorID in ITEM must exist in VendorID in VENDORCustomerID in SALE must exist in CustomerID in CUSTOMEREmployeeID in SALE must exist in EmployeeID in EMPLOYEESaleID in SALE_ITEM must exist in SaleID in SALEItemID in SALE_ITEM must exist in ItemID in ITEMAssume that CustomerID of CUSTOMER, EmployeeID of EMPLOYEE, ItemID of ITEM, SaleID of SALE, and SaleItemID of SALE_ITEM are all surrogate keys with values as follows:CustomerID Start at 1 Increment by 1EmployeeID Start at 1 Increment by 1VendorID Start at 1 Increment by 1ItemID Start at 1 Increment by 1SaleID Start at 1 Increment by 1A vendor may be an individual or a company. If the vendor is an individual, the CompanyName field is left blank, while the ContactLastName and ContactFirstName fields must have data values. If the vendor is a company, the company name is recorded in the CompanyName field, and the name of the primary contact at the company is recorded in the ContactLastName and ContactFirstName fields. For each SQL statement you write, show the results based on your data. R. Write an SQL statement to modify the vendor with CompanyName of "Linens and Things" to "Linens and Other Stuff".S. Write SQL statements to switch the values of Vendor CompanyName so that all rows currently having the value Linens and Things will have the value Lamps and Lighting and all rows currently having the value Lamps and Lighting will have the value Linens and Things, T. Given your assumptions about cascading solutions in your answer to part B, write the fewest number of DELETE statements possible to remove all the data in your database but leave the table structures in tact. Do not run these statements if you are using an actual database. My answer to Part B was:CREATE TABLE Sale_Item ( SaleID Int NOT NULL, SaleItemID Int NOT NULL, ItemID Int NOT NULL, ItemPrice Numeric NOT NULL, CONSTRAINT SALE_ITEM_PK PRIMARY KEY(SaleID, SaleItemID) ); FOREIGN KEY (SaleID) REFERENCES SALE ON DELETE CASCADE); FOREIGN KEY (itemID) REFERENCES ITEM ON DELETE CASCADE);

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
When working with a team you should always do the following, except? question 3 options: be dependable and trustworthy be sensitive to others feelings do your fair share critique members of the group
Answers: 2
question
Computers and Technology, 23.06.2019 02:50
There’s only one game mode that stars with the letter ‘e’ in cs: go. which of the options below is it?
Answers: 1
question
Computers and Technology, 23.06.2019 12:30
What is the difference between the internet and the world wide web?
Answers: 1
question
Computers and Technology, 23.06.2019 18:50
Ais a picture icon that is a direct link to a file or folder
Answers: 1
You know the right answer?
Assume that The Queen Anne Curiosity Shop designs a database with the following tables:CUSTOMER (Cus...
Questions
question
Mathematics, 21.12.2020 14:00
question
Chemistry, 21.12.2020 14:00
question
Social Studies, 21.12.2020 14:00
Questions on the website: 13722362