Difference between revisions of "Schema:pubs"

From ISFDB
Jump to navigation Jump to search
(→‎Description: +description of the pipe ("|") functionality for pub_frontimage)
 
(6 intermediate revisions by 2 users not shown)
Line 9: Line 9:
 
  | pub_year      | date                                  | YES  |    | NULL    |                |
 
  | pub_year      | date                                  | YES  |    | NULL    |                |
 
  | publisher_id  | int(11)                              | YES  |    | NULL    |                |
 
  | publisher_id  | int(11)                              | YES  |    | NULL    |                |
  | pub_pages      | varchar(16)                           | YES  |    | NULL    |                |
+
  | pub_pages      | varchar(100)                         | YES  |    | NULL    |                |
 
  | pub_ptype      | varchar(32)                          | YES  |    | NULL    |                |
 
  | pub_ptype      | varchar(32)                          | YES  |    | NULL    |                |
  | pub_ctype      | enum('ANTHOLOGY','CHAPTERBOOK',       |      |    |        |                |
+
  | pub_ctype      | enum('ANTHOLOGY','CHAPBOOK',         |      |    |        |                |
 
  |                |      'COLLECTION','MAGAZINE',        |      |    |        |                |
 
  |                |      'COLLECTION','MAGAZINE',        |      |    |        |                |
 
  |                |      'NONFICTION','NOVEL',            |      |    |        |                |
 
  |                |      'NONFICTION','NOVEL',            |      |    |        |                |
 
  |                |      'OMNIBUS','FANZINE')            | YES  |    | NULL    |                |
 
  |                |      'OMNIBUS','FANZINE')            | YES  |    | NULL    |                |
  | pub_isbn      | varchar(32)                           | YES  |    | NULL    |                |
+
  | pub_isbn      | varchar(100)                         | YES  |    | NULL    |                |
 
  | pub_frontimage | mediumtext                            | YES  |    | NULL    |                |
 
  | pub_frontimage | mediumtext                            | YES  |    | NULL    |                |
  | pub_price      | varchar(16)                           | YES  |    | NULL    |                |
+
  | pub_price      | varchar(100)                         | YES  |    | NULL    |                |
  | note_id        | int(11)                              | YES  |     | NULL    |                |
+
  | note_id        | int(11)                              | YES  | MUL | NULL    |                |
 
  | pub_series_id  | int(11)                              | YES  |    | NULL    |                |
 
  | pub_series_id  | int(11)                              | YES  |    | NULL    |                |
 
  | pub_series_num | varchar(64)                          | YES  |    | NULL    |                |
 
  | pub_series_num | varchar(64)                          | YES  |    | NULL    |                |
 +
| pub_catalog    | mediumtext                            | YES  |    | NULL    |                |
 
  +----------------+---------------------------------------+------+-----+---------+----------------+
 
  +----------------+---------------------------------------+------+-----+---------+----------------+
  
 
==Description==
 
==Description==
  
The pubs table directly replicates the old ISFDB pubs record format (BOOKS/ZINES, pubs.dbase).
+
The pubs table stores information about publication records.
  
* '''pub_id''' - This column is the unique record id for the pubs table. A title may be referred to by this unique id.  
+
* '''pub_id''' - Unique record id for the pubs table.
  
* '''pub_title''' - This column holds the working title.  
+
* '''pub_title''' - The title of this publication.
  
* '''pub_tag''' - This column holds a unique ascii tag for the publication.  
+
* '''pub_tag''' - A unique tag for the publication. Note that the use of publication-specific tags has been deprecated. You can still use them in publication page URLs and when linking from publications to Wiki pages, but this functionality is expected to go away in the future. Publication tags are not to be confused with title tags, which are stored in the "tags" table.
  
* '''pub_year''' - This column contains the publication date of the publication.  
+
* '''pub_year''' - 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.  
+
* '''publisher_id''' - ID of this publication's publisher found in the "publishers" table.  
  
* '''pub_pages''' - This column holds the page count of the publication.  
+
* '''pub_pages''' - The page count of the publication.  
  
* '''pub_ptype''' - This column holds publication binding type.
+
* '''pub_ptype''' - Publication binding type. The database definition supports arbitrary values to to 32 characters in length, but the software will only let editors enter the values stored in the global variable BINDINGS in the common/isfdb.py module.
** hc = hardcover
 
** pb = paperback
 
** ph = pamphlet
 
** tp = trade
 
  
(NOTE: This should be an ennumerated type)
+
* '''pub_ctype''' - Type of the publication. Supports the enumerated values listed in the database definition.
  
* '''pub_ctype''' - This column holds the database type of the publication.
+
* '''pub_isbn''' - The publication's ISBN-10 or ISBN-13 value.
  
* '''pub_isbn''' - This column holds the publication's ISBN value.  
+
* '''pub_frontimage''' - URL of an online image of the cover. If a pipe character ("|") is present, then everything before it is the URL of the image and everything after it is the URL of the Web page that the ISFDB software will link to when the image is clicked.
  
* '''pub_frontimage''' - This column holds a URL to on online image of the cover.  
+
* '''pub_price''' - The price of the publication. Main price only, other prices are entered in notes.
  
* '''pub_price''' - This column holds the price of the publication.  
+
* '''note_id''' - ID of this publication's note 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''' - ID of this publication's publication series record found in the "pub_series" 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 publication number within its publication series.
  
* '''pub_series_num''' - This column contains a value which refers to a publication series position.
+
* '''catalog_id''' - This publication's Catalog ID if present.

Latest revision as of 12:28, 3 May 2019

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(100)                          | YES  |     | NULL    |                |
| pub_ptype      | varchar(32)                           | YES  |     | NULL    |                |
| pub_ctype      | enum('ANTHOLOGY','CHAPBOOK',          |      |     |         |                |
|                |      'COLLECTION','MAGAZINE',         |      |     |         |                |
|                |      'NONFICTION','NOVEL',            |      |     |         |                |
|                |      'OMNIBUS','FANZINE')             | YES  |     | NULL    |                |
| pub_isbn       | varchar(100)                          | YES  |     | NULL    |                |
| pub_frontimage | mediumtext                            | YES  |     | NULL    |                |
| pub_price      | varchar(100)                          | YES  |     | NULL    |                |
| note_id        | int(11)                               | YES  | MUL | NULL    |                |
| pub_series_id  | int(11)                               | YES  |     | NULL    |                |
| pub_series_num | varchar(64)                           | YES  |     | NULL    |                |
| pub_catalog    | mediumtext                            | YES  |     | NULL    |                |
+----------------+---------------------------------------+------+-----+---------+----------------+

Description

The pubs table stores information about publication records.

  • pub_id - Unique record id for the pubs table.
  • pub_title - The title of this publication.
  • pub_tag - A unique tag for the publication. Note that the use of publication-specific tags has been deprecated. You can still use them in publication page URLs and when linking from publications to Wiki pages, but this functionality is expected to go away in the future. Publication tags are not to be confused with title tags, which are stored in the "tags" table.
  • pub_year - The publication date of the publication.
  • publisher_id - ID of this publication's publisher found in the "publishers" table.
  • pub_pages - The page count of the publication.
  • pub_ptype - Publication binding type. The database definition supports arbitrary values to to 32 characters in length, but the software will only let editors enter the values stored in the global variable BINDINGS in the common/isfdb.py module.
  • pub_ctype - Type of the publication. Supports the enumerated values listed in the database definition.
  • pub_isbn - The publication's ISBN-10 or ISBN-13 value.
  • pub_frontimage - URL of an online image of the cover. If a pipe character ("|") is present, then everything before it is the URL of the image and everything after it is the URL of the Web page that the ISFDB software will link to when the image is clicked.
  • pub_price - The price of the publication. Main price only, other prices are entered in notes.
  • note_id - ID of this publication's note record found in the "notes" table.
  • pub_series_id - ID of this publication's publication series record found in the "pub_series" table.
  • pub_series_num - This publication number within its publication series.
  • catalog_id - This publication's Catalog ID if present.