Difference between revisions of "Chado Stock Module"
m |
m |
||
Line 526: | Line 526: | ||
[[Category:Chado]] | [[Category:Chado]] | ||
− |
Revision as of 15:15, 5 April 2007
Contents
- 1 Introduction
- 2 Tables
- 2.1 Table: stock
- 2.2 Table: stock_cvterm
- 2.3 Table: stock_dbxref
- 2.4 Table: stock_genotype
- 2.5 Table: stock_pub
- 2.6 Table: stock_relationship
- 2.7 Table: stock_relationship_pub
- 2.8 Table: stockcollection
- 2.9 Table: stockcollection_stock
- 2.10 Table: stockcollectionprop
- 2.11 Table: stockprop
- 2.12 Table: stockprop_pub
Introduction
This page or section needs to be edited. Please help by editing this page to add your revisions or additions.
Tables
Table: stock
Any stock can be globally identified by the combination of organism, uniquename and stock type. A stock is the physical entities, either living or preserved, held by collections. Stocks belong to a collection; they have IDs, type, organism, description and may have a genotype.
F-Key | Name | Type | Description |
---|---|---|---|
stock_id | serial | PRIMARY KEY | |
dbxref_id | integer | The dbxref_id is an optional primary stable identifier for this stock. Secondary indentifiers and external dbxrefs go in table: stock_dbxref. | |
organism_id | integer | UNIQUE#1 NOT NULL The organism_id is the organism to which the stock belongs. This column is mandatory. | |
name | character varying(255) | The name is a human-readable local name for a stock. | |
uniquename | text | UNIQUE#1 NOT NULL | |
description | text | The description is the genetic description provided in the stock list. | |
type_id | integer | UNIQUE#1 NOT NULL The type_id foreign key links to a controlled vocabulary of stock types. The would include living stock, genomic DNA, preserved specimen. Secondary cvterms for stocks would go in stock_cvterm. | |
is_obsolete | boolean | NOT NULL DEFAULT false |
Tables referencing this one via Foreign Key Constraints:
Table: stock_cvterm
stock_cvterm links a stock to cvterms. This is for secondary cvterms; primary cvterms should use stock.type_id.
F-Key | Name | Type | Description |
---|---|---|---|
stock_cvterm_id | serial | PRIMARY KEY | |
stock_id | integer | UNIQUE#1 NOT NULL | |
cvterm_id | integer | UNIQUE#1 NOT NULL | |
pub_id | integer | UNIQUE#1 NOT NULL |
Table: stock_dbxref
stock_dbxref links a stock to dbxrefs. This is for secondary identifiers; primary identifiers should use stock.dbxref_id.
F-Key | Name | Type | Description |
---|---|---|---|
stock_dbxref_id | serial | PRIMARY KEY | |
stock_id | integer | UNIQUE#1 NOT NULL | |
dbxref_id | integer | UNIQUE#1 NOT NULL | |
is_current | boolean | NOT NULL DEFAULT true The is_current boolean indicates whether the linked dbxref is the current -official- dbxref for the linked stock. |
Table: stock_genotype
Simple table linking a stock to a genotype. Features with genotypes can be linked to stocks thru feature_genotype -> genotype -> stock_genotype -> stock.
F-Key | Name | Type | Description |
---|---|---|---|
stock_genotype_id | serial | PRIMARY KEY | |
stock_id | integer | UNIQUE#1 NOT NULL | |
genotype_id | integer | UNIQUE#1 NOT NULL |
Table: stock_pub
Provenance. Linking table between stocks and, for example, a stocklist computer file.
F-Key | Name | Type | Description |
---|---|---|---|
stock_pub_id | serial | PRIMARY KEY | |
stock_id | integer | UNIQUE#1 NOT NULL | |
pub_id | integer | UNIQUE#1 NOT NULL |
Table: stock_relationship
F-Key | Name | Type | Description |
---|---|---|---|
stock_relationship_id | serial | PRIMARY KEY | |
subject_id | integer | UNIQUE#1 NOT NULL | |
object_id | integer | UNIQUE#1 NOT NULL | |
type_id | integer | UNIQUE#1 NOT NULL | |
value | text | ||
rank | integer | UNIQUE#1 NOT NULL |
Tables referencing this one via Foreign Key Constraints:
Table: stock_relationship_pub
Provenance. Attach optional evidence to a stock_relationship in the form of a publication.
F-Key | Name | Type | Description |
---|---|---|---|
stock_relationship_pub_id | serial | PRIMARY KEY | |
stock_relationship_id | integer | UNIQUE#1 NOT NULL | |
pub_id | integer | UNIQUE#1 NOT NULL |
Table: stockcollection
The lab or stock center distributing the stocks in their collection.
F-Key | Name | Type | Description |
---|---|---|---|
stockcollection_id | serial | PRIMARY KEY | |
type_id | integer | UNIQUE#1 NOT NULL type_id is the collection type cv. | |
contact_id | integer | contact_id links to the contact information for the collection. | |
name | character varying(255) | name is the collection. | |
uniquename | text | UNIQUE#1 NOT NULL uniqename is the value of the collection cv. |
Tables referencing this one via Foreign Key Constraints:
Table: stockcollection_stock
stockcollection_stock links a stock collection to the stocks which are contained in the collection.
F-Key | Name | Type | Description |
---|---|---|---|
stockcollection_stock_id | serial | PRIMARY KEY | |
stockcollection_id | integer | UNIQUE#1 NOT NULL | |
stock_id | integer | UNIQUE#1 NOT NULL |
Table: stockcollectionprop
The table stockcollectionprop contains the value of the stock collection such as website/email URLs; the value of the stock collection order URLs.
F-Key | Name | Type | Description |
---|---|---|---|
stockcollectionprop_id | serial | PRIMARY KEY | |
stockcollection_id | integer | UNIQUE#1 NOT NULL | |
type_id | integer | UNIQUE#1 NOT NULL | |
value | text | ||
rank | integer | UNIQUE#1 NOT NULL |
Table: stockprop
A stock can have any number of slot-value property tags attached to it. This is an alternative to hardcoding a list of columns in the relational schema, and is completely extensible. There is a unique constraint, stockprop_c1, for the combination of stock_id, rank, and type_id. Multivalued property-value pairs must be differentiated by rank.
F-Key | Name | Type | Description |
---|---|---|---|
stockprop_id | serial | PRIMARY KEY | |
stock_id | integer | UNIQUE#1 NOT NULL | |
type_id | integer | UNIQUE#1 NOT NULL | |
value | text | ||
rank | integer | UNIQUE#1 NOT NULL |
Tables referencing this one via Foreign Key Constraints:
Table: stockprop_pub
Provenance. Any stockprop assignment can optionally be supported by a publication.
F-Key | Name | Type | Description |
---|---|---|---|
stockprop_pub_id | serial | PRIMARY KEY | |
stockprop_id | integer | UNIQUE#1 NOT NULL | |
pub_id | integer | UNIQUE#1 NOT NULL |