Web site construction - Chapter 8: Intranet Simple Document Publisher 249 .
Chapter 8: Intranet Simple Document Publisher 249 . In each category there will be many documents. Each document will have tracking information and responses. Therefore each document has many tracking and response data. Based on these requirements, we can create the database relationship as shown in Figure 8-1. Here the LD_CATEGORY table has one to many relationships with the LD_DOCUMENTS table because each category can have many documents. Similarly, LD_CATEGORY has one to many relationships with LD_CAT_VIEWER (viewer list) and LD_CAT_PUBLISHER (publisher list) tables. Since each document in LD_DOCUMENT table has many tracking and response records, it has one to many relationships with LD_TRACK (tracking data) and LD_RESPONSE (response data) tables. Figure 8-1: Intranet document publisher database diagram. Table 8-1 describes each table in the database. TABLE 8-1 DOCUMENT PUBLISHER DATABASE TABLES Table Description LD_CATEGORY This table is the integral part of this database. It holds the category number (CAT_ID), which is automatically generated by the database, and the category name (CAT_NAME), description (CAT_DESC), and order (CAT_ORDER). LD_CAT_PUBLISHER Contains the category publisher information: the category number (CAT_ID) and the ID of the publisher who can publish document in that category (PUBLISHER_ID). LD_CAT_VIEWER Holds the category viewer information: the category number (CAT_ID) and the viewer ID of the user who can view documents in that category (VIEWER_ID). Continued