Difference between revisions of "Schema:authors"

From ISFDB
Jump to navigation Jump to search
(Breaking up larger article)
(No difference)

Revision as of 20:11, 22 May 2008

Schema Summary

+--------------------+-------------+------+-----+---------+----------------+
| Field              | Type        | Null | Key | Default | Extra          |
+--------------------+-------------+------+-----+---------+----------------+
| author_id          | int(11)     | NO   | PRI | NULL    | auto_increment |
| author_canonical   | mediumtext  | YES  | MUL | NULL    |                |
| author_legalname   | mediumtext  | YES  |     | NULL    |                |
| author_birthplace  | varchar(64) | YES  |     | NULL    |                |
| author_birthdate   | date        | YES  |     | NULL    |                |
| author_deathdate   | date        | YES  |     | NULL    |                |
| note_id            | int(11)     | YES  |     | NULL    |                |
| author_wikipedia   | mediumtext  | YES  |     | NULL    |                |
| author_views       | int(11)     | YES  |     | 0       |                |
| author_imdb        | mediumtext  | YES  |     | NULL    |                |
| author_marque      | int(11)     | NO   |     | 0       |                |
| author_image       | mediumtext  | YES  |     | NULL    |                |
| author_annualviews | int(11)     | NO   |     | 0       |                |
| author_lastname    | mediumtext  | YES  |     | NULL    |                |
+--------------------+-------------+------+-----+---------+----------------+

Description

The authors table directly replicates the old ISFDB author record format. Under the old ISFDB format we only used an author record when something about the author was known; under the new ISFDB format there is an author record for every author referenced by the database. This change is needed to support author normalization.

  • author_id - This column is the unique record id for the author table. An author may be referred to by this unique id. This column is the primary key from the authors table.
  • author_canonical - This column holds the author's ISFDB canonical name.
  • author_legalname - This column holds the author's actual name.
  • author_birthplace - This column holds the birthplace of the author. Although this is a flat text column, by convention it should contain City,State,Country.
  • author_birthdate - This column holds the birthdate of the author. May be of the form YYYY-00-00 or YYYY-MM-DD if known.
  • author_deathdate - This column holds the deathdate of the author. May be of the form YYYY-00-00 or YYYY-MM-DD if known.
  • note_id - This column contains an integer value which refers to the ID of a record found in the notes table.
  • author_wikipedia - This column holds a URL to the author's Wikipedia entry, if one exists.
  • author_views - This column holds the number of times this author's bibliography has been viewed.
  • author_imdb - This columns holds a URL to the author's IMDB entry, if one exists.
  • author_marque - This column indicates the relative popularity of the author. If set to a non-zero value, the author's forthcoming books will be displayed on the front page.
  • author_image - This column points to an optional URL of the author's image.
  • author_annualviews - This column holds the number of times this author's bibliography has been viewed in the current calendar year.
  • author_lastname - This column holds the last name of the author. This is used to alphabetize lists of authors; for instance the author directory.