Skip to content

Data model Documentation

Tables of all models in the Biokb Chebi database with field descriptions and relationships.

Compound

Column Type Description
id int Primary key
name str Compound name
source str (optional) Source identifier (max 32 chars)
merge_type str (optional) Merge type (1 char)
chebi_accession str ChEBI accession number (max 30 chars)
definition str (optional) Compound definition
ascii_name str (optional) ASCII representation of name
stars int Star rating
modified_on datetime (optional) Last modification timestamp
release_date datetime (optional) Release date
status_id int (optional) Foreign key to Status
parent_id int (optional) Foreign key to parent Compound

Relationships

  • status → Status
  • chemical_data → List[ChemicalData]
  • comments → List[Comment]
  • database_accessions → List[DatabaseAccession]
  • names → List[Name]
  • references → List[Reference]
  • structures → List[Structure]

ChemicalData

Column Type Description
id int Primary key
formula str (optional) Chemical formula
charge int (optional) Molecular charge
mass float (optional) Molecular mass
monoisotopic_mass float (optional) Monoisotopic mass
is_autogenerated bool Whether data is autogenerated
status_id int (optional) Foreign key to Status
structure_id int (optional) Foreign key to Structure
compound_id int Foreign key to Compound

Relationships

  • status → Status
  • structure → Structure
  • compound → Compound

Comment

Column Type Description
id int Primary key
comment str Comment text
author_name str (optional) Author name
datatype str Data type (max 30 chars)
datatype_id int Data type identifier
compound_id int Foreign key to Compound
status_id int Foreign key to Status

Relationships

  • compound → Compound
  • status → Status

DatabaseAccession

Column Type Description
id int Primary key
accession_number str (optional) External database accession (max 255 chars)
type str Accession type (max 255 chars)
status_id int Foreign key to Status
source_id int Foreign key to Source
compound_id int Foreign key to Compound

Relationships

  • status → Status
  • source → Source
  • compound → Compound

Name

Column Type Description
id int Primary key
name str (optional) Name text
type str Name type (max 255 chars)
adapted bool Whether name is adapted
language_code str Language code (2 chars)
ascii_name str (optional) ASCII representation of name
compound_id int Foreign key to Compound
status_id int Foreign key to Status

Relationships

  • compound → Compound
  • status → Status

RelationType

Column Type Description
id int Primary key
code str Relation type code (max 255 chars)
allow_cycles bool Whether cycles are allowed
description str (optional) Description (max 255 chars)

Relationships

  • relations → List[Relation]

Relation

Column Type Description
id int Primary key
evidence_accession str (optional) Evidence accession (max 7 chars)
evidence_source_id int (optional) Foreign key to Source (evidence)
relation_type_id int Foreign key to RelationType
init_id int Foreign key to initial Compound
final_id int Foreign key to final Compound
status_id int Foreign key to Status

Relationships

  • relation_type → RelationType
  • init_compound → Compound
  • final_compound → Compound
  • status → Status
  • evidence_source → Source

Reference

Column Type Description
id int Primary key
location_in_ref str (optional) Location in reference (max 255 chars)
accession_number str Reference accession number (max 255 chars)
reference_name str (optional) Reference name
source_id int Foreign key to Source
compound_id int Foreign key to Compound

Relationships

  • source → Source
  • compound → Compound

Structure

Column Type Description
id int Primary key
smiles str (optional) SMILES notation
standard_inchi str (optional) Standard InChI
standard_inchi_key str (optional) Standard InChI key (max 27 chars)
dimension str Structure dimension (max 30 chars)
default_structure bool Whether this is the default structure
compound_id int Foreign key to Compound
status_id int Foreign key to Status

Relationships

  • compound → Compound
  • status → Status
  • chemical_data → List[ChemicalData]

Source

Column Type Description
id int Primary key
name str Source name (max 255 chars)
url str (optional) Source URL (max 255 chars)
prefix str Source prefix (max 255 chars)
description str (optional) Description

Relationships

  • references → List[Reference]
  • relations → List[Relation]
  • database_accessions → List[DatabaseAccession]

Status

Column Type Description
id int Primary key
name str Status name (max 20 chars)

Relationships

  • compounds → List[Compound]
  • chemical_data → List[ChemicalData]
  • relations → List[Relation]
  • names → List[Name]
  • database_accessions → List[DatabaseAccession]
  • comments → List[Comment]
  • structures → List[Structure]

Entity Relationship Diagram

ER model