expand icon
book Database Processing: Fundamentals, Design, and Implementation 13th Edition by David Kroenke, David Auer cover

Database Processing: Fundamentals, Design, and Implementation 13th Edition by David Kroenke, David Auer

Edition 13ISBN: 978-0133058352
book Database Processing: Fundamentals, Design, and Implementation 13th Edition by David Kroenke, David Auer cover

Database Processing: Fundamentals, Design, and Implementation 13th Edition by David Kroenke, David Auer

Edition 13ISBN: 978-0133058352
Exercise 1
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:
Chapter 7:
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 MDC database described in the Case Problems in Chapter 10A for SQL 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 question B.
D. Suppose that Marcia decides to allow multiple customers per order (for customers' spouses, for example). Modify the design of these tables.
E. Code SQL statements necessary to redesign the database, as described in your answer to question 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 question G.
Explanation
Verified
like image
like image

A.
11ef3f70_0d36_b1b2_b3f3_176614cf0409...

close menu
Database Processing: Fundamentals, Design, and Implementation 13th Edition by David Kroenke, David Auer
cross icon