Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Marcia Wilson owns and operates Marcia's Dry Cleaning, which is an upscale dry cleaner in a well-to-do suburban neighborhood. Marcia makes her business stand out

Marcia Wilson owns and operates Marcia's Dry Cleaning, which is an upscale dry cleaner in a well-to-do suburban neighborhood. Marcia makes her business stand out from the competition by providing superior customer service. She wants to keep track of each of her customers and their orders. Ultimately, she wants to notify them that their clothes are ready via email. Suppose that you have designed a database for Marcia's Dry Cleaning that has the following tables:

CUSTOMER (CustomerID, FirstName, LastName, Phone, EmailAddress)

INVOICE (InvoiceNumber, CustomerID, DateIn, DateOut, Subtotal, Tax, TotalAmount)

INVOICE_ITEM (InvoiceNumber, ItemNumber, ServiceID, Quantity, UnitPrice, ExtendedPrice)

SERVICE (ServiceID, ServiceDescription, UnitPrice)

Assume that all relationships have been defined, as implied by the foreign keys in this table list, and that the appropriate referential integrity constraints are in place. The referential integrity constraints are:

CustomerID in INVOICE must exist in CustomerID in CUSTOMER

InvoiceNumber in INVOICE_ITEM must exist in InvoiceNumber in INVOICE

ServiceID in INVOICE_ITEM must exist in ServiceID in SERVICE

Assume 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 100 Increment by 1

InvoiceNumber Start at 2018001 Increment by 1

If you want to run these solutions in a DBMS product, first create a version of the MDC database described in the Case Questions in Chapter 10A for Microsoft SQL Server 2017, Chapter 10B for Oracle Database, and Chapter 10C for MySQL 5.7. Name the database MDC_CH08.

Create a dependency graph that shows dependencies among these tables. Explain how you need to extend this graph for views and other database constructs, such as triggers and stored procedures.

Using your dependency graph, describe the tasks necessary to change the name of the INVOICE table to CUST_INVOICE.

Write all SQL statements to make the name change described in part B.

Suppose that Marcia decides to allow multiple customers per order (e.g., for customers' spouses). Modify the design of these tables to accommodate this change.

Code SQL statements necessary to redesign the database, as described in your answer to part D.

Suppose that Marcia considers changing the primary key of CUSTOMER to (FirstName, LastName). Write correlated subqueries to display any data that indicate that this change is not justifiable.

Suppose that (FirstName, LastName) can be made the primary key of CUSTOMER. Make appropriate changes to the table design with this new primary key.

Code all SQL statements necessary to implement the changes described in part G.

PLEASE ANSWER C AND E AND F AND H

PLEASES ASAP THANK YOU

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Quality Management Essential Planning For Breweries

Authors: Mary Pellettieri

1st Edition

1938469151, 978-1938469152

More Books

Students also viewed these General Management questions

Question

All ten project management knowledge areas

Answered: 1 week ago