Database Schema
Introduction
There are three primary document views utilized by the ISFDB: showing the bibliography of an author, showing the titles present in a publication, and showing the publications in which a title was published. These views require three primary tables: authors, titles, and publications. Various normalization tables are provided to reduce errors and storage needs.
The illustration below shows the relationship between the various tables. All notes are stored in the notes table, which other tables refer to via the primary note_id key. There are two tables which are used for administrative and display purposes. The metadata table contains data pertinent to the database itself, while the magazine table contains information that allows magazine publication to be grouped under a single magazine heading.
A high-level explanation of the database can be found in the Database Overview article. An up to date diagram of the ISFDB tables and their relationships can be found here.
Global Tables
Information stored in the global tables are shared across the title, author, and publication related tables in the ISFDB.
- Schema:metadata - Contains metadata about the database itself.
- Schema:notes - General-purpose notes area.
- Schema:submissions - Table for storing data submissions.
- Schema:history - Tracks database change history.
- Schema:directory - Holds author directory information.
- Schema:license_keys - Holds user license key information.
Author-Related Tables
The following tables are used to store information about authors and their works:
- Schema:authors - Contains information about an author.
- Schema:canonical_author - Links author records to title records.
- Schema:emails - Specialized table for storing email addresses.
- Schema:pseudonyms - Table of pseudonyms.
- Schema:pub_authors - Links author records to publication records.
- Schema:webpages - Specialized table for storing webpage URLs.
Publication-Related Tables
The following tables are used to store information about publications:
- Schema:magazine - Contains magazine information. Will be deleted in near future.
- Schema:publishers - Contains publisher information.
- Schema:pubs - Contains information on a specific publication.
- Schema:pub_content - Links title records to a specific publication.
- Schema:verification - Contains verification information for a specific publication.
- Schema:reference - Contains information on verification references.
Title-Related Tables
The following tables are used to store information about titles:
- Schema:series - Contains series information.
- Schema:titles - Contains information about a specific title.
- Schema:tags - Contains user-defined title tags.
- Schema:tag_mapping - Links a tags entry to a specific title per user.
- Schema:votes - Tracks votes for a specific title per user.
Awards-Related Tables
The following tables are used to store information about awards:
- Schema:awards - Contains award information.
title_awards
CREATE TABLE title_awards ( taw_id int(11) NOT NULL auto_increment, award_id int(11) default NULL, title_id int(11) default NULL, PRIMARY KEY (taw_id), KEY award_id (award_id), KEY title_id (title_id) ) ENGINE=MyISAM;
The title_awards table maps an award to a title listed in the titles table.
- taw_id - This column is the unique record id for the title_awards table.
- award_id - This column contains an integer value which refers to the ID of a record found in the awardss table.
- title_id - This column contains an integer value which refers to the ID of a record found in the titles table.