Difference between revisions of "Schema:authors"

From ISFDB
Jump to navigation Jump to search
(Breaking up larger article)
 
(2016 updates)
Line 18: Line 18:
 
  | author_annualviews | int(11)    | NO  |    | 0      |                |
 
  | author_annualviews | int(11)    | NO  |    | 0      |                |
 
  | author_lastname    | mediumtext  | YES  |    | NULL    |                |
 
  | author_lastname    | mediumtext  | YES  |    | NULL    |                |
 +
| author_language    | int(11)    | YES  |    | NULL    |                |
 
  +--------------------+-------------+------+-----+---------+----------------+
 
  +--------------------+-------------+------+-----+---------+----------------+
  
Line 24: Line 25:
 
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.
 
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_id''' - Unique record id for the author table.
  
* '''author_canonical''' - This column holds the author's ISFDB canonical name.  
+
* '''author_canonical''' - Author's canonical name.  
  
* '''author_legalname''' - This column holds the author's actual name.  
+
* '''author_legalname''' - Author's legal name in the "family name, given name" format.
  
* '''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_birthplace''' - The birthplace of the author. 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_birthdate''' - The birth date 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.  
+
* '''author_deathdate''' - The death date 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.
+
* '''note_id''' - The ID of the this author's note in the "notes" table.
  
 
* '''author_wikipedia''' - This column holds a URL to the author's Wikipedia entry, if one exists.
 
* '''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_views''' - 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_imdb''' - URL to the author's IMDB entry. '''No longer used'''.
  
* '''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_marque''' - Indicates the relative popularity of the author. Periodically recalculated based on the author_views value above. If set to a non-zero value, this author's forthcoming books will be eligible for display on the front page.
  
* '''author_image''' - This column points to an optional URL of the author's image.
+
* '''author_image''' - 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_annualviews''' - 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.
+
* '''author_lastname''' - The family name of the author. Automatically derived from the author's canonical name when the author is first added to the database, but may be edited later on. ''Only'' used to alphabetize lists of authors and build the author directory.
 +
 
 +
* '''author_language''' - The author's working language, i.e. the language of most of his or her works. Pointer to the "languages" table.

Revision as of 18:39, 3 September 2016

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    |                |
| author_language    | int(11)     | 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 - Unique record id for the author table.
  • author_canonical - Author's canonical name.
  • author_legalname - Author's legal name in the "family name, given name" format.
  • author_birthplace - The birthplace of the author. It should contain City, State, Country.
  • author_birthdate - The birth date of the author. May be of the form YYYY-00-00 or YYYY-MM-DD if known.
  • author_deathdate - The death date of the author. May be of the form YYYY-00-00 or YYYY-MM-DD if known.
  • note_id - The ID of the this author's note in the "notes" table.
  • author_wikipedia - This column holds a URL to the author's Wikipedia entry, if one exists.
  • author_views - The number of times this author's bibliography has been viewed.
  • author_imdb - URL to the author's IMDB entry. No longer used.
  • author_marque - Indicates the relative popularity of the author. Periodically recalculated based on the author_views value above. If set to a non-zero value, this author's forthcoming books will be eligible for display on the front page.
  • author_image - URL of the author's image.
  • author_annualviews - The number of times this author's bibliography has been viewed in the current calendar year.
  • author_lastname - The family name of the author. Automatically derived from the author's canonical name when the author is first added to the database, but may be edited later on. Only used to alphabetize lists of authors and build the author directory.
  • author_language - The author's working language, i.e. the language of most of his or her works. Pointer to the "languages" table.