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 13:00
Which part of the cpu accepts data?
Answers: 1
question
Computers and Technology, 22.06.2019 17:30
Where would you click to edit the chart data?
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
If an appliance consumes 500 w of power and is left on for 5 hours, how much energy is used over this time period? a. 2.5 kwh b. 25 kwh c. 250 kwh d. 2500 kwh
Answers: 1
question
Computers and Technology, 24.06.2019 17:00
What are some examples of what can be changed through options available in the font dialog box? check all that apply. font family italicizing bolding pasting drop shadow cutting character spacing special symbols
Answers: 2
You know the right answer?
Assume that The Queen Anne Curiosity Shop designs a database with the following tables:CUSTOMER (Cus...
Questions
question
Mathematics, 20.08.2019 03:10
question
Mathematics, 20.08.2019 03:20
Questions on the website: 13722361