Difference between revisions of "Schema:award types"

From ISFDB
Jump to navigation Jump to search
(New page: ==Schema Summary== +--------------+------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------+---------...)
 
(2016 update)
 
Line 1: Line 1:
 
==Schema Summary==
 
==Schema Summary==
  
  +--------------+------------+------+-----+---------+----------------+
+
  +-----------------------+------------------+------+-----+---------+----------------+
  | Field       | Type       | Null | Key | Default | Extra          |
+
  | Field                 | Type             | Null | Key | Default | Extra          |
  +--------------+------------+------+-----+---------+----------------+
+
  +-----------------------+------------------+------+-----+---------+----------------+
  | code         | varchar(2) | NO  | PRI |        |                |  
+
  | award_type_id         | int(11)         | NO  | PRI | NULL    | auto_increment |
  | name        | mediumtext | YES  |    |         |                |   
+
| award_type_code      | varchar(5)      | YES  |    | NULL    |                |
  +--------------+------------+------+-----+---------+----------------+
+
| award_type_name      | mediumtext      | YES  |    | NULL    |                |
 +
| award_type_wikipedia  | mediumtext      | YES  |    | NULL    |                |
 +
| award_type_note_id    | int(11)          | YES  |    | NULL    |                |
 +
| award_type_by         | mediumtext      | YES  |    | NULL    |                |
 +
| award_type_for        | mediumtext      | YES  |    | NULL    |                |
 +
  | award_type_short_name | mediumtext       | YES  |    | NULL    |                |
 +
| award_type_poll      | enum('Yes','No') | YES  |    | NULL    |                |
 +
| award_type_non_genre  | enum('Yes','No') | YES |    | NULL    |                |
 +
  +-----------------------+------------------+------+-----+---------+----------------+
  
 
==Description==
 
==Description==
  
Not yet implemented and subject to change. Designed to replace hard-coded award_ttypes.  
+
* '''award_type_id''' - Unique primary key.
 
+
* '''award_type_code''' - A two-letter abbreviation for this award type. Obsolete and no longer used.
* '''code''' - This column holds a two-letter award code.
+
* '''award_type_name''' - Full name of the award type.
 
+
* '''award_type_wikipedia''' - URL of the related Wikipedia article. Obsolete and no longer used.
* '''name''' - This column holds an ASCII plain-text description of the award.
+
* '''award_type_note_id''' - ID of the record in the note table where the note for this award type is stored.
 +
* '''award_type_by''' - The name of the group or organization who gives the award.
 +
* '''award_type_for''' - What the award is given for.
 +
* '''award_type_short_name''' - Commonly used shortened name of this award type, e.g. "Hugo".
 +
* '''award_type_poll''' - A 0/1 flag indicating whether this award type uses ranked polls (1) or unranked nominations (0).
 +
* '''award_type_non_genre''' - A 0/1 flag indicating whether this award type is primary for non-genre works.

Latest revision as of 12:16, 3 September 2016

Schema Summary

+-----------------------+------------------+------+-----+---------+----------------+
| Field                 | Type             | Null | Key | Default | Extra          |
+-----------------------+------------------+------+-----+---------+----------------+
| award_type_id         | int(11)          | NO   | PRI | NULL    | auto_increment |
| award_type_code       | varchar(5)       | YES  |     | NULL    |                |
| award_type_name       | mediumtext       | YES  |     | NULL    |                |
| award_type_wikipedia  | mediumtext       | YES  |     | NULL    |                |
| award_type_note_id    | int(11)          | YES  |     | NULL    |                |
| award_type_by         | mediumtext       | YES  |     | NULL    |                |
| award_type_for        | mediumtext       | YES  |     | NULL    |                |
| award_type_short_name | mediumtext       | YES  |     | NULL    |                |
| award_type_poll       | enum('Yes','No') | YES  |     | NULL    |                |
| award_type_non_genre  | enum('Yes','No') | YES  |     | NULL    |                |
+-----------------------+------------------+------+-----+---------+----------------+

Description

  • award_type_id - Unique primary key.
  • award_type_code - A two-letter abbreviation for this award type. Obsolete and no longer used.
  • award_type_name - Full name of the award type.
  • award_type_wikipedia - URL of the related Wikipedia article. Obsolete and no longer used.
  • award_type_note_id - ID of the record in the note table where the note for this award type is stored.
  • award_type_by - The name of the group or organization who gives the award.
  • award_type_for - What the award is given for.
  • award_type_short_name - Commonly used shortened name of this award type, e.g. "Hugo".
  • award_type_poll - A 0/1 flag indicating whether this award type uses ranked polls (1) or unranked nominations (0).
  • award_type_non_genre - A 0/1 flag indicating whether this award type is primary for non-genre works.