A1: | One of the design requirements for the system was that users could optionally place each picture in a category. This means that a given picture may be in a particular category or in no category at all. When a record in the Pictures table has a Null value for its CategoryID column, the picture does not belong to any category. This is a common technique used when the records of the "many" table in a one-to-many relationship might not belong to any record in the "one" table. For this reason, Null values are allowed by the foreign key constraint. |
A2: | If you are comfortable adding your own columns and have some data you want to capture that isn't being captured by my suggested data model, then feel free to add the additional columns. (Of course, you'll need to also add additional Web controls to the user interface for uploading a picture.) What I recommend, however, is that you first complete the photo album application exactly as I'm doing it so that you can follow along in the book. Then, after creating and testing the application, return to the design phase and augment the requirements to include the additional information you are in interested in storing. |