Schema:webpages

From ISFDB
Revision as of 20:23, 22 May 2008 by Alvonruff (talk | contribs) (Breaking up larger article)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Schema Summary

+--------------+------------+------+-----+---------+----------------+
| Field        | Type       | Null | Key | Default | Extra          |
+--------------+------------+------+-----+---------+----------------+
| webpage_id   | int(11)    | NO   | PRI | NULL    | auto_increment |
| author_id    | int(11)    | YES  |     | NULL    |                |
| publisher_id | int(11)    | YES  |     | NULL    |                |
| url          | mediumtext | YES  |     | NULL    |                |
+--------------+------------+------+-----+---------+----------------+

Description

Since an author may have more than one webpage, a webpage table is necessary to map multiple webpages to a single author record.

  • webpage_id - This column is the unique record id for the webpages table. It is the primary key for the table.
  • author_id - This column is a foreign key which points to a record in the authors table.
  • publisher_id - This column is a foreign key which points to a record in the publishers table.
  • url - This column holds an author webpage address.