Exercises, Questions, and Projects


  1. Start over or add entries to the tables in the preceding examples. As you are doing so, tell yourself what the entries represent.

  2. Modify the mail-order example to store shipping information with each order. Shipping information consists of an address and shipping costs.

  3. Modify the mail-order example to allow some products to be backordered and some not. This means that both the order and the product_on_order records would contain a status field. It would be appropriate to have an additional field with an expected date for backordered items. This field would sometimes be blank. This does not contradict the goal of having exactly one value for each field; it just means that sometimes the field is not used.

  4. Building on the course, section, and prerequisite example, design a database to handle scheduling of courses at a college. You will need tables for courses, sections of courses, prerequisites, and faculty. Consider also that sections are scheduled for rooms or labs or sometimes both. This means that you will probably need a locations table.

  5. Design a database for student records. You can build on the scheduling example. You will need tables for student information and student enrollment in a course. This latter table would contain the course grade.

  6. Define a database for a library. A library has books, magazines, and other media in stock. More specifically, a library generally has multiple copies of most of its items. This means that your design would involve a table that could be called catalog that holds one record for each title, and another table for all holdings that has one record for each book, CD, and so on. The record for a book would point to the record for its title. The holdings records each indicate that location of the item. A library also has a table for each library cardholder. You need to define how to connect items on loan with the library cardholder who has checked the item out.

  7. Define a database for a quiz show. This is in preparation for one of the main examples in later chapters. You will need tables for questions and contestants. In addition, as with the library example, you will need a table, call it history, that indicates what questions were asked by what contestant.




Creating Database Web Applications with PHP and ASP
Creating Database Web Applications with PHP and ASP (Charles River Media Internet & Web Design)
ISBN: 1584502649
EAN: 2147483647
Year: 2005
Pages: 125
Authors: Jeanine Meyer

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net