Difference between revisions of "Schema:pubs"

From ISFDB
Jump to navigation Jump to search
Line 56: Line 56:
  
 
* '''note_id''' - This column contains an integer value which refers to the ID of a record found in the notes table.
 
* '''note_id''' - This column contains an integer value which refers to the ID of a record found in the notes table.
 +
 +
* '''pub_series_id''' - This column contains an integer value which refers to the ID of a record found in the pub_series table.
 +
 +
* '''pub_series_num''' - This column contains a value which refers to a publication series position.

Revision as of 13:10, 1 July 2011

Schema Summary

+----------------+---------------------------------------+------+-----+---------+----------------+
| Field          | Type                                  | Null | Key | Default | Extra          |
+----------------+---------------------------------------+------+-----+---------+----------------+
| pub_id         | int(11)                               | NO   | PRI | NULL    | auto_increment |
| pub_title      | mediumtext                            | YES  | MUL | NULL    |                |
| pub_tag        | varchar(32)                           | YES  | MUL | NULL    |                |
| pub_year       | date                                  | YES  |     | NULL    |                |
| publisher_id   | int(11)                               | YES  |     | NULL    |                |
| pub_pages      | varchar(16)                           | YES  |     | NULL    |                |
| pub_ptype      | varchar(32)                           | YES  |     | NULL    |                |
| pub_ctype      | enum('ANTHOLOGY','CHAPTERBOOK',       |      |     |         |                |
|                |      'COLLECTION','MAGAZINE',         |      |     |         |                |
|                |      'NONFICTION','NOVEL',            |      |     |         |                |
|                |      'OMNIBUS','FANZINE')             | YES  |     | NULL    |                |
| pub_isbn       | varchar(32)                           | YES  |     | NULL    |                |
| pub_frontimage | mediumtext                            | YES  |     | NULL    |                |
| pub_price      | varchar(16)                           | YES  |     | NULL    |                |
| note_id        | int(11)                               | YES  |     | NULL    |                |
| pub_series_id  | int(11)                               | YES  |     | NULL    |                |
| pub_series_num | varchar(64)                           | YES  |     | NULL    |                |
+----------------+---------------------------------------+------+-----+---------+----------------+

Description

The pubs table directly replicates the old ISFDB pubs record format (BOOKS/ZINES, pubs.dbase).

  • pub_id - This column is the unique record id for the pubs table. A title may be referred to by this unique id.
  • pub_title - This column holds the working title.
  • pub_tag - This column holds a unique ascii tag for the publication.
  • pub_year - This column contains the publication date of the publication.
  • publisher_id - This column contains an integer value which refers to the ID of a record found in the publishers table.
  • pub_pages - This column holds the page count of the publication.
  • pub_ptype - This column holds publication binding type.
    • hc = hardcover
    • pb = paperback
    • ph = pamphlet
    • tp = trade

(NOTE: This should be an ennumerated type)

  • pub_ctype - This column holds the database type of the publication.
  • pub_isbn - This column holds the publication's ISBN value.
  • pub_frontimage - This column holds a URL to on online image of the cover.
  • pub_price - This column holds the price of the publication.
  • note_id - This column contains an integer value which refers to the ID of a record found in the notes table.
  • pub_series_id - This column contains an integer value which refers to the ID of a record found in the pub_series table.
  • pub_series_num - This column contains a value which refers to a publication series position.