Difference between revisions of "Schema:webpages"

From ISFDB
Jump to navigation Jump to search
(Breaking up larger article)
 
(Added award type, series, award category and publication ID fields)
 
(2 intermediate revisions by one other user not shown)
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  | MUL | NULL    |                |
  | publisher_id | int(11)    | YES  |     | NULL    |                |
+
  | publisher_id | int(11)    | YES  | MUL | NULL    |                |
  | url         | mediumtext | YES  |    | NULL    |                |
+
  | url           | mediumtext | YES  |    | NULL    |                |
  +--------------+------------+------+-----+---------+----------------+
+
| pub_series_id | int(11)    | YES  | MUL | NULL    |                |
 +
| title_id      | int(11)    | YES  | MUL | NULL    |                |
 +
| award_type_id | int(11)    | YES  | MUL | NULL    |                |
 +
| series_id    | int(11)    | YES  | MUL | NULL    |                |
 +
| award_cat_id  | int(11)    | YES  | MUL | NULL    |                |
 +
| pub_id        | int(11)    | YES  | MUL | NULL    |                |
 +
  +---------------+------------+------+-----+---------+----------------+  
  
 
==Description==
 
==Description==
Line 21: Line 27:
  
 
* '''url''' - This column holds an author webpage address.
 
* '''url''' - This column holds an author webpage address.
 +
 +
* '''pub_series_id'''  - This column is a foreign key which points to a record in the pub_series table.
 +
 +
* '''title_id'''  - This column is a foreign key which points to a record in the titles table.
 +
 +
* '''award_type_id'''  - This column is a foreign key which points to a record in the award type table.
 +
 +
* '''series_id'''  - This column is a foreign key which points to a record in the series table.
 +
 +
* '''award_cat_id'''  - This column is a foreign key which points to a record in the award category table.
 +
 +
* '''pub_id'''  - This column is a foreign key which points to a record in the publication table.

Latest revision as of 20:44, 27 December 2019

Schema Summary

+---------------+------------+------+-----+---------+----------------+
| Field         | Type       | Null | Key | Default | Extra          |
+---------------+------------+------+-----+---------+----------------+
| webpage_id    | int(11)    | NO   | PRI | NULL    | auto_increment |
| author_id     | int(11)    | YES  | MUL | NULL    |                |
| publisher_id  | int(11)    | YES  | MUL | NULL    |                |
| url           | mediumtext | YES  |     | NULL    |                |
| pub_series_id | int(11)    | YES  | MUL | NULL    |                |
| title_id      | int(11)    | YES  | MUL | NULL    |                |
| award_type_id | int(11)    | YES  | MUL | NULL    |                |
| series_id     | int(11)    | YES  | MUL | NULL    |                |
| award_cat_id  | int(11)    | YES  | MUL | NULL    |                |
| pub_id        | int(11)    | YES  | MUL | 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.
  • pub_series_id - This column is a foreign key which points to a record in the pub_series table.
  • title_id - This column is a foreign key which points to a record in the titles table.
  • award_type_id - This column is a foreign key which points to a record in the award type table.
  • series_id - This column is a foreign key which points to a record in the series table.
  • award_cat_id - This column is a foreign key which points to a record in the award category table.
  • pub_id - This column is a foreign key which points to a record in the publication table.