Difference between revisions of "Schema:title relationships"

From ISFDB
Jump to navigation Jump to search
(→‎Description: 2016 update)
 
Line 13: Line 13:
 
==Description==
 
==Description==
  
The title relationships table creates a relationship between a review title, series title, or translation title to the title record it is a review, series, or translation of.
+
The title_relationships table creates a relationship between a review title and the title record it is a review of. At one point it was envisioned that this table may also be used for series and translation records, which led to the addition of the "series_id" and "translation_id" columns.
  
 
* '''tr_id''' - This column is the unique record id for the title_relationships table.
 
* '''tr_id''' - This column is the unique record id for the title_relationships table.
  
* '''title_id''' - A relationship is made to this title. Every entry must have a title_id.
+
* '''title_id''' - ID of the title for this relationship. Every entry in this table must have a title_id.
  
 
* '''review_id''' - A review which reviews title_id.
 
* '''review_id''' - A review which reviews title_id.
  
* '''series_id''' - A title which serializes title_id. Currently Unused.
+
* '''series_id''' - A title which serializes title_id. '''Currently Unused'''.
  
* '''translation_id''' - A translation of title_id. Currently Unused.
+
* '''translation_id''' - A translation of title_id. '''Currently Unused'''.

Latest revision as of 20:18, 3 September 2016

Schema Summary

+----------------+---------+------+-----+---------+----------------+
| Field          | Type    | Null | Key | Default | Extra          |
+----------------+---------+------+-----+---------+----------------+
| tr_id          | int(11) | NO   | PRI | NULL    | auto_increment |
| title_id       | int(11) | YES  | MUL | NULL    |                |
| review_id      | int(11) | YES  | MUL | NULL    |                |
| series_id      | int(11) | YES  | MUL | NULL    |                |
| translation_id | int(11) | YES  | MUL | NULL    |                |
+----------------+---------+------+-----+---------+----------------+

Description

The title_relationships table creates a relationship between a review title and the title record it is a review of. At one point it was envisioned that this table may also be used for series and translation records, which led to the addition of the "series_id" and "translation_id" columns.

  • tr_id - This column is the unique record id for the title_relationships table.
  • title_id - ID of the title for this relationship. Every entry in this table must have a title_id.
  • review_id - A review which reviews title_id.
  • series_id - A title which serializes title_id. Currently Unused.
  • translation_id - A translation of title_id. Currently Unused.