Question
Marcia's Dry Cleaning Case Questions Marcia Wilson owns and operates Marcia's Dry Cleaning, which is an upscale dry cleaner in a well-to-do suburban neighborhood. Marcia
Marcia's Dry Cleaning Case Questions 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 e-mail. Suppose that you have designed a database for Marcia's Dry Cleaning that has the following tables: CUSTOMER (CustomerID, FirstName, LastName, Phone, Email)
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. If you want to run these solutions in a DBMS product, first create a version of the of the MDC database described in the Case Problems in Chapter 10A for MSQL Server 2012, Chapter 10B for Oracle Database 11g Release 2, and Chapter 10C for MySQL 5.6. Name the database MDC-CH08.
A. 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.
B. Using your dependency graph, describe the tasks necessary to change the name of the INVOICE table to CUST_INVOICE.
C. Write all SQL statements to make the name change described in part B.
D. 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.
E. Code SQL statements necessary to redesign the database, as described in your answer to part D.
F. 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.
G. Suppose that (FirstName, LastName) can be made the primary key of CUSTOMER. Make appropriate changes to the table design with this new primary key.
H. Code all SQL statements necessary to implement the changes described in part G.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started