Schema:titles

From ISFDB
Revision as of 22:03, 22 May 2008 by Alvonruff (talk | contribs) (Breaking up larger article)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Schema Summary

+-------------------+-----------------------------------------+------+-----+---------+----------------+
| Field             | Type                                    | Null | Key | Default | Extra          |
+-------------------+-----------------------------------------+------+-----+---------+----------------+
| title_id          | int(11)                                 | NO   | PRI | NULL    | auto_increment |
| title_title       | mediumtext                              | YES  | MUL | NULL    |                |
| title_translator  | mediumtext                              | YES  |     | NULL    |                |
| title_synopsis    | int(11)                                 | YES  |     | NULL    |                |
| note_id           | int(11)                                 | YES  | MUL | NULL    |                |
| series_id         | int(11)                                 | YES  | MUL | NULL    |                |
| title_seriesnum   | int(11)                                 | YES  |     | NULL    |                |
| title_copyright   | date                                    | YES  |     | NULL    |                |
| title_storylen    | mediumtext                              | YES  |     | NULL    |                |
| title_ttype       | enum('ANTHOLOGY', 'BACKCOVERART',       |      |     |         |                |
|                   |   'COLLECTION', 'COVERART',             |      |     |         |                |
|                   |   'INTERIORART', 'EDITOR', 'ESSAY',     |      |     |         |                |
|                   |   'INTERVIEW', 'NOVEL', 'NONFICTION',   |      |     |         |                |
|                   |   'NONGENRE', 'OMNIBUS', 'POEM',        |      |     |         |                |
|                   |   'REVIEW','SERIAL', 'SHORTFICTION',    |      |     |         |                |
|                   |   'CHAPTERBOOK')                        | YES  | MUL | NULL    |                |
| title_wikipedia   | mediumtext                              | YES  |     | NULL    |                |
| title_views       | int(11)                                 | NO   |     | 0       |                |
| title_parent      | int(11)                                 | NO   | MUL | 0       |                |
| title_rating      | float                                   | YES  |     | NULL    |                |
| title_annualviews | int(11)                                 | NO   |     | 0       |                |
| title_ctl         | int(10) unsigned                        | NO   |     | 0       |                |
+-------------------+-----------------------------------------+------+-----+---------+----------------+

Description

  • title_id - This column is the unique record id for the titles table. A title may be referred to by this unique id.
  • title_title - This column holds the working title.
  • title_translator - This column holds information concerning translations. It is currently of the form Translation;Translation;Translation, where each translation is of the form Language,Year,Translator. In general, this format is awkward and error-prone, and a new mechanism is needed to handle translation information. It really should be attached to the publication, but that leaves a problem when talking about a single work of short fiction in a magazine.
  • title_synopsis - This column holds a pointer to a free-form note that describes the basic synopsis of the work.
  • note_id - This column contains an integer value which refers to the ID of a record found in the notes table.
  • series_id = This column contains an integer value which refers to the ID of a record found in the series table.
  • title_seriesnum - This column contains the series number of the title. We need to think about what the right thing to do is if series information is pulled out into another table.
  • title_copyright - This column contains the copyright year of the title (date of first publication).
  • title_storylen - This column has been overloaded to mean numerous things. For shortfiction, nv=novella, nt=novelette, ss=shortstory, sf=shortfiction (unknown length). For novels jvn=juvenile, nvz=novelization. This is totally messed up and needs a new mechanism.
  • title_ttype - This column identifies the title type
  • title_wikipedia - This column holds the URL to a Wikipedia article.
  • title_views - This column contains the number of times a particular title has been viewed.
  • title_parent - This column is a pointer to a parent title. If zero, the record is a canonical title; if non-zero the record is a variant title, and the column refers to the parent canonical title.
  • title_rating - This column contains this title's average vote rating. This column is recalculated whenever a users posts a vote against this particular title. This column is set only when 5 or more votes exist for the title.
  • title_annualviews - This column contains the number of times a particular title has been viewed in the current calendar year.
  • title_ctl - This column contains exception bits which can be used to control the title display under distinct unique conditions.