Computers and Technology

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);

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 21:30, willwhitlock803
Write code using c . (take input from user) calculate the size of a given file in kbs. in this task you will complete the function with the following prototype: float get_file_size(char * filename); the function takes the file name (address to the start of a null terminated character array) as input. the function should then open the file and find the number of bytes it contains till eof. the number of bytes divided by 1024 will give the size in kbs. if the file cannot be opened the function should return -1.
Answers: 2
image
Computers and Technology, 22.06.2019 10:40, pbarbee3034
Nims is applicable to all stakeholders with incident related responsibilities. true or false
Answers: 1
image
Computers and Technology, 24.06.2019 10:00, genyjoannerubiera
In which view can you see speaker notes?
Answers: 1
image
Computers and Technology, 24.06.2019 17:30, KaleahV
List at least one thing to check for when you're checking the clarity and professionalism of a document.
Answers: 1
Do you know the correct answer?
Assume that The Queen Anne Curiosity Shop designs a database with the following tables:CUSTOMER (Cus...

Questions in other subjects:

Konu
Mathematics, 27.06.2019 04:00
Konu
Chemistry, 27.06.2019 04:00
Konu
Mathematics, 27.06.2019 04:00