Difference between revisions of "Schema:webpages"

From ISFDB
Jump to navigation Jump to search
(Breaking up larger article)
 
Line 1: Line 1:
 
==Schema Summary==
 
==Schema Summary==
  
  +--------------+------------+------+-----+---------+----------------+
+
  +---------------+------------+------+-----+---------+----------------+
  | Field       | Type      | Null | Key | Default | Extra          |
+
  | Field         | Type      | Null | Key | Default | Extra          |
  +--------------+------------+------+-----+---------+----------------+
+
  +---------------+------------+------+-----+---------+----------------+
  | webpage_id   | int(11)    | NO  | PRI | NULL    | auto_increment |
+
  | webpage_id   | int(11)    | NO  | PRI | NULL    | auto_increment |
  | author_id   | int(11)    | YES  |    | NULL    |                |
+
  | author_id     | int(11)    | YES  |    | NULL    |                |
  | publisher_id | int(11)    | YES  |    | NULL    |                |
+
  | publisher_id | int(11)    | YES  |    | NULL    |                |
  | url         | mediumtext | YES  |    | NULL    |                |
+
  | url           | mediumtext | YES  |    | NULL    |                |
  +--------------+------------+------+-----+---------+----------------+
+
| pub_series_id | int(11)    | YES  |    | NULL    |                |
 +
| title_id      | int(11)    | YES  |    | NULL    |                |
 +
  +---------------+------------+------+-----+---------+----------------+
  
 
==Description==
 
==Description==

Revision as of 12:29, 1 July 2011

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    |                |
| pub_series_id | int(11)    | YES  |     | NULL    |                |
| title_id      | int(11)    | 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.