Database Reference
In-Depth Information
E. Code a PHP page to display CustomerPurchasesView. Add a hyperlink to the QACS Web
page to access the page. Using your sample database, demonstrate that your page works.
F. Code two HTML/PHP pages to receive a date value AsOfDate and display rows of
the CustomerPurchasesView for purchases having SaleDate greater than or equal to
AsOfDate. Add a hyperlink to the QACS Web page to access the HTML page. Using
your sample database, demonstrate that your pages work.
G. Write a stored procedure that receives values for SaleItemID and NewItemPrice and
sets the value of ItemPrice to NewItemPrice for the row having the given value of
SaleItemID. Generate an error message if no row has the given value of SaleItemID.
Using your sample database, demonstrate that your stored procedure works.
h. Code two HTML/PHP pages to invoke the stored procedure created in part G. Add a
hyperlink to the QACS Web page to access the HTML page. Using your sample data-
base, demonstrate that your page works.
I. Create an XML Schema Document for a row of the CUSTOMER table. Use only simple
elements, and use Figure 11-51 as an example.
J. Create an XML Schema document for a join of CUSTOMER and SALE data. Assume
that the document has one customer and from zero to many orders for that customer.
Use Figure 11-58 as an example.
K. Write an SQL statement with FOR XML that will produce the document you created in
part J.
L. Create an XML Schema document that has all of the data for a given customer. How
many multivalued paths does this schema have?
M. Explain how the XML Schema document you created in part L can be used to advan-
tage by The Queen Anne Curiosity Shop.
If you have not already done so, answer the questions for Morgan Importing (MI) at the
end of Chapter 7 (page 359-365), and for the DBMS you are using as described in:
Chapter 10A for Microsoft SQL Server 2012
Chapter 10B for Oracle Database 11 g Release 2
Chapter 10C Oracle MySQL 5.6
A. Add a new folder to the DBP Web site named MI. Create a Web page for Morgan Importing
in this folder, using the file name index.html. Link this page to the DBP Web page.
B. Create an appropriate ODBC data source for your database.
C. Create a view called StorePurchasesView that has the columns StoreName, City,
Country, EmailAddress, Contact, PurchaseDate, ItemID, ItemDescription, Category,
and PriceUSD.
D. Code a PHP page to display StorePurchasesView. Add a hyperlink to the MI Web page
to access the page. Using your sample database, demonstrate that your page works.
E. Code two HTML/PHP pages to receive a date value AsOfDate and display rows of
StorePurchasesView for purchases having PurchaseDate greater than or equal to
AsOfDate. Add a hyperlink to the MI Web page to access the HTML page. Using your
sample database, demonstrate that your pages work.
F. Code two HTML/PHP pages to receive values of Country and Category and display
rows of StorePurchasesView having values for input Country and Category values. Add
a hyperlink to the MI Web page to access the HTML page. Using your sample database,
demonstrate that your pages work.
 
 
Search WWH ::




Custom Search