Description of Schema


Tables

pub
pub_relationship
pub_dbxref
pubauthor
pubprop

pub

Top
Comments:

$Id: pub.html,v 1.3 2007-03-16 01:28:38 briano Exp $
==========================================
Chado pub module
=================================================================
Dependencies:
:import cvterm from cv
:import dbxref from general
=================================================================
================================================
TABLE: pub
================================================
A documented provenance artefact - publications, documents, personal communication.
Field Name Data Type Size Default Value Other Foreign Key
pub_id integer 11 PRIMARY KEY, NOT NULL
title text 64000 Descriptive general heading.
volumetitle text 64000 Title of part if one of a series.
volume varchar 255
series_name varchar 255 Full name of (journal) series.
issue varchar 255
pyear varchar 255
pages varchar 255 Page number range[s], e.g. 457--459, viii + 664pp, lv--lvii.
miniref varchar 255
uniquename text 64000 UNIQUE, NOT NULL
type_id integer 10 NOT NULL, The type of the publication (book, journal, poem, graffiti, etc). Uses pub cv. cvterm.cvterm_id
is_obsolete boolean 0 false
publisher varchar 255
pubplace varchar 255

Indices

Name Fields
pub_idx1 type_id

Constraints

Type Fields
NOT NULL pub_id
NOT NULL uniquename
NOT NULL type_id
FOREIGN KEY type_id
UNIQUE uniquename

pub_relationship

Top
Comments:

================================================
TABLE: pub_relationship
================================================
Handle relationships between publications, e.g. when one publication makes others obsolete, when one publication contains errata with respect to other publication(s), or when one publication also appears in another pub.
Field Name Data Type Size Default Value Other Foreign Key
pub_relationship_id integer 11 PRIMARY KEY, NOT NULL
subject_id integer 10 UNIQUE, NOT NULL pub.pub_id
object_id integer 10 UNIQUE, NOT NULL pub.pub_id
type_id integer 10 UNIQUE, NOT NULL cvterm.cvterm_id

Indices

Name Fields
pub_relationship_idx1 subject_id
pub_relationship_idx2 object_id
pub_relationship_idx3 type_id

Constraints

Type Fields
NOT NULL pub_relationship_id
NOT NULL subject_id
FOREIGN KEY subject_id
NOT NULL object_id
FOREIGN KEY object_id
NOT NULL type_id
FOREIGN KEY type_id
UNIQUE subject_id, object_id, type_id

pub_dbxref

Top
Comments:

================================================
TABLE: pub_dbxref
================================================
Handle links to repositories, e.g. Pubmed, Biosis, zoorec, OCLC, Medline, ISSN, coden...
Field Name Data Type Size Default Value Other Foreign Key
pub_dbxref_id integer 11 PRIMARY KEY, NOT NULL
pub_id integer 10 UNIQUE, NOT NULL pub.pub_id
dbxref_id integer 10 UNIQUE, NOT NULL dbxref.dbxref_id
is_current boolean 0 true NOT NULL

Indices

Name Fields
pub_dbxref_idx1 pub_id
pub_dbxref_idx2 dbxref_id

Constraints

Type Fields
NOT NULL pub_dbxref_id
NOT NULL pub_id
FOREIGN KEY pub_id
NOT NULL dbxref_id
FOREIGN KEY dbxref_id
NOT NULL is_current
UNIQUE pub_id, dbxref_id

pubauthor

Top
Comments:

================================================
TABLE: pubauthor
================================================
An author for a publication. Note the denormalisation (hence lack of _ in table name) - this is deliberate as it is in general too hard to assign IDs to authors.
Field Name Data Type Size Default Value Other Foreign Key
pubauthor_id integer 11 PRIMARY KEY, NOT NULL
pub_id integer 10 UNIQUE, NOT NULL pub.pub_id
rank integer 10 UNIQUE, NOT NULL, Order of author in author list for this pub - order is important.
editor boolean 0 false Indicates whether the author is an editor for linked publication. Note: this is a boolean field but does not follow the normal chado convention for naming booleans.
surname varchar 100 NOT NULL
givennames varchar 100 First name, initials
suffix varchar 100 Jr., Sr., etc

Indices

Name Fields
pubauthor_idx2 pub_id

Constraints

Type Fields
NOT NULL pubauthor_id
NOT NULL pub_id
FOREIGN KEY pub_id
NOT NULL rank
NOT NULL surname
UNIQUE pub_id, rank

pubprop

Top
Comments:

================================================
TABLE: pubprop
================================================
Property-value pairs for a pub. Follows standard chado pattern.
Field Name Data Type Size Default Value Other Foreign Key
pubprop_id integer 11 PRIMARY KEY, NOT NULL
pub_id integer 10 UNIQUE, NOT NULL pub.pub_id
type_id integer 10 UNIQUE, NOT NULL cvterm.cvterm_id
value text 64000 NOT NULL
rank integer 10 UNIQUE

Indices

Name Fields
pubprop_idx1 pub_id
pubprop_idx2 type_id

Constraints

Type Fields
NOT NULL pubprop_id
NOT NULL pub_id
FOREIGN KEY pub_id
NOT NULL type_id
FOREIGN KEY type_id
NOT NULL value
UNIQUE pub_id, type_id, rank

Created by
SQL::Translator 0.08