Question: Unit 2 Assignment # 2 : THE QUEEN ANNE CURIOSITY SHOP PROJECT Due Apr 2 2 by 1 1 : 5 9 pm Points 4
Unit Assignment #: THE QUEEN ANNE CURIOSITY SHOP PROJECT
Due Apr by :pm Points Submitting a file upload File Types sql docx, doc, and pdf Available until Apr at :pm
Q Assignment Instructions
Read carefully and follow all steps. When finished with your assignment, submit two separate files:
The SQL script file. a sql file
A "screenshot" file showing the results of the SQL script. a Word or PDF file
You can check this website for some assistance and guidance: Saving SQL Scripts
Add a comment to name your queries according to the question number. Begin the comment with two hyphens
Example:
Query Number
SELECT column column
FROM tablename;
To view the results of a specific query, select the query you want to execute and then click on the execute button. This will show the output related to the selected query.
Capture a screenshot of the entire DB browser window, including the query and its output.
Combine the screenshots by copying and pasting them into a single Word document file. Afterward, submit the file in either Word or PDF format.
THE QUEEN ANNE CURIOSITY SHOP PROJECT
The Queen Anne Curiosity Shop is an upscale home furnishings store in a welltodo urban neighborhood. It sells both antiques and currentproduction household items that complement or are useful with the antiques. For example, the store sells antique dining room tables and new tablecloths. The antiques are purchased from both individuals and wholesalers, and the new items are purchased from distributors. The store's customers include individuals, owners of bedandbreakfast operations, and local interior designers who work with both individuals and small businesses. The antiques are unique, though some multiple items, such as dining room chairs, may be available as a set sets are never broken The new items are not unique, and an item may be reordered if it out of stock. New items are also available in various sizes and colors for example, a particular style of tablecloth may be available in several sizes and in a variety of colors
Assume that The Queen Anne Curiosity Shop designs a database with the following tables:
CUSTOMER CustomerID LastName, FirstName, EmailAddress, EncryptedPassword, Address, City, State, ZIP, Phone, ReferredBy
ITEM ItemID ItemDescription, CompanyName, PurchaseDate, ItemCost, ItemPrice
SALE SaleID CustomerID, SaleDate, SubTotal, Tax, Total
SALEITEM SaleID SaleltemID, ItemID, ItemPrice
The referential integrity constraints are:
ReferredBy in CUSTOMER must exist in CustomerID in CUSTOMER
CustomerID in SALE must exist in CustomerID in CUSTOMER
SaleID in SALEITEM must exist in SaleID in SALE
ItemID in SALEITEM must exist in ItemID in ITEM
Assume that CustomerID of CUSTOMER, ItemID of ITEM, SaleID of SALE, and SaleltemID of SALEITEM are all surrogate kevs with values as follows:
Assume that CustomerID of CUSTOMER, ItemID of IIEM, SaleID of SALE, and SaleltemID of SALEIIEM are all surrogate keys with values as follows:
CustomerID Start at Increment by
ItemID Start at Increment by
SaleID Start at Increment by
The database that The Queen Anne Curiosity Shop has created is named QACS, and the four tables in the QACS database schema are shown in Figure Note that CUTOMER contains a recursive relationship between
ReferredBy and CustomerID, where ReferredBy contains the CustomerID value of the existing customer who referred the new customer to the Queen Anne Curiosity Shop.
Figure The QACS Database
The column characteristics for the tables are shown in Figures and The relationships CUSTOMERtoSALE and ITEMtoSALEITEM should enforce referential integrity, but not cascade updates or deletions, whereas the relationship between SALE and SALEITEM should enforce referential integrity and
cascade both updates and deletions.
CUSTOMER
tableColumn Name,Type,Key,Required,RemarksCustomerIDInteger,Primary Key,Yes,Surrogate KeyLastNameCharacter NoYes,FirstNameCharacter NoYes,EmailAddressCharacter NoNoUse VarcharEncryptedPasswordCharacterNoNoUse VarcharAddressCharacter NoNoCityCharacter NoNoStateCharacter NoNoZIPCharacter NoNoPhoneCharacter NoYes,ReferredByInteger,Forelgn Key,NoREF: CustomerID
Figure Column Characteristics for the QACS Database CUSTOMER Table
SALE
tableColumn Name,Type,Key,Required,RemarksSaleIDInteger,Primary Key,Yes,Surrogate KeyCustomerIDInteger,Forelgn Key,Yes,REF: CUSTOMERSaleDateDate,NoYes,SubTotalNumber NoNoTaxNumber NoNoTotalNumber NoNo
Figure Column Characteristics for the QACS Database SALE Table
SALEITEM
tableColumn Name,Type,Key,Required,RemarksSaleIDInteger,tablePrimary Key,Foreign KeyYes,REF: SALESaleltemI
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
