TO ACCOMPANY
DAVID M. KROENKE AND DAVID J. AUER
Database Processing
Fundamentals, Design, and Implementation
13th Edition
CHAPTER SEVEN
SQL FOR DATABASE CONSTRUCTION AND APPLICATION PROCESSING
Prepared By
David J. Auer
Western Washington University
,ScholarStock
, Chapter Seven – SQL For Database Construction and Application Processing
CHAPTER OBJECTIVES
To be able to create and manage table structures using SQL statements
To understand how referential integrity actions are implemented in SQL statements
To be able to create and use SQL constraints
To understand several uses for SQL views
To be able to use SQL statements to create and use views
To gain an understanding of how SQL is used in an application program
To understand how to create and use triggers
To understand how to create and use stored procedures
ERRATA
Page 346. [6-NOV-2013 – Corrected in the Solution Manual solutions and
associated files] Continued Figure 7-41 in the Heather Sweeney Designs Case
Questions contains an error. The third line of the L_I_INVOICE_FK constraint
should read ON UPDATE NO ACTION instead of ON IPDATE NO ACTION. The
corrected continued figure should appear as:
Page 7-3
ScholarStock
, Chapter Seven – SQL For Database Construction and Application Processing
Page 353. [15-JUN-2013 – Corrected in the Solution Manual solutions and
associated files] Heather Sweeney Designs Case Question R contains an
extraneous table and column reference. The question should read:
R. Write an SQL statement to create a view called InvoiceSummaryView that contains
INVOICE.InvoiceNumber, INVOICE.InvoiceDate, LINE_ITEM.LineNumber,
SALE_ITEM.ItemID, PRODUCT.Description, and LINE_ITEM.UnitPrice. Run the
statement to create the view, and then test the view with an appropriate SQL SELECT
statement.
Page 355. [01-NOV-2013 – Corrected in the Solution Manual solutions and
associated files] The Queen Anne Curiosity Shop Project Questions sample data
in Figure 7-43 has an error in the email address for Donna Anderson
(CustomerID 6). The correct email address is:
Page 356. [15-JUN-2013 – Corrected in the Solution Manual solutions and
associated files] The Queen Anne Curiosity Shop Project Question P should
read:
P. Write an SQL statement to create a view called CustomerSaleHistoryView that (1) includes
all columns of CustomerSaleSummaryView except SALE_ITEM.SaleItemID,
ITEM.ItemID, and SALE_ITEM.ItemDescription; (2) groups orders by SALE.SaleID,
Page 7-4
ScholarStock