KDDart core ER diagram Version: 2.7.0

Core module of KDDart. Implemented in MySQL with triggers.

[BACK TO TOP]

Region: Breeding methodsBreeding methods for specimens

Table: breedingmethodControlled vocabulary of breeding methodology

ColNameDatatypePKFKAINNDefaultValueComments
BreedingMethodIdINTEGERPK AINNinternal id
BreedingMethodTypeIdINTEGER FK NNtype of breeding method related to class breedingmethod in generaltype table
BreedingMethodNameVARCHAR(100)   NNbreeding method name
BreedingMethodAcronymVARCHAR(30)    short version of the breeding method name
BreedingMethodNoteTEXT    breeding method short description
BreedingMethodSymbolVARCHAR(10)    symbol of breeding method (e.g. delimiter in pedigree string)
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`BreedingMethodId`
xbm_TypeIdINDEX`BreedingMethodTypeId`
xbm_NameUNIQUE`BreedingMethodName`
xbm_AcronymUNIQUE`BreedingMethodAcronym`


Table: breedingmethodfactorAdditional virtual column values for Breeding Methods.

ColNameDatatypePKFKAINNDefaultValueComments
BreedingMethodIdINTEGERPKFK NNBreeding method id
FactorIdINTEGERPKFK NNFactor id
FactorValueVARCHAR(254)   NNValue of the virtual column for Breeding Method
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`BreedingMethodId`, `FactorId`
FactorIdINDEX`FactorId`


[BACK TO TOP]

Region: Genotypes and Specimens

Table: genotypeList of genotypes available for trial units. Direct relation to the trial unit maybe sometimes problematic, especially in horticulture when one plant can be a single trial unit and can be a hybrid of a few genotypes. This is why specimen is established as a subunit of the genotype. In this case one genotype can have more than one specimen (plants, plant groups), which may grow in various locations. Synonym for genotype can be variety or gemplams and should be used as a generic category. Specimen permission fields are only inherited from this table, using trigger and DAL mechanism.

ColNameDatatypePKFKAINNDefaultValueComments
GenotypeIdINTEGERPK AINNgenotype id
TaxonomyIdINTEGER FK  taxonomy id
GenotypeNameVARCHAR(255)   NNgenotype name
GenusIdINTEGER FK NNgenus / organism
SpeciesNameVARCHAR(255)    name in Latin - common naming conventions should be established - For use when using different species and a trial from another genus
GenotypeAcronymVARCHAR(32)    short name of genotype
OriginIdINTEGER(10)   NNScource Identifier - possible Part of Plant Variety Rights Information - could refer to organisation or contact
CanPublishGenotypeTINYINT(1)   NNflag if publicly available
GenotypeColorVARCHAR(32)    Possibly to utilise as Part of Plant Variety Rights Information
GenotypeNoteVARCHAR(6000)    description
OwnGroupIdINTEGER   NNgroup id which owns the record
AccessGroupIdINTEGER   NN0group id with access to the record (different than own group)
OwnGroupPermTINYINT   NNpermission for the own group members
AccessGroupPermTINYINT   NN0permission for the other group members
OtherPermTINYINT   NN0permission for all the other system users
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`GenotypeId`
xg_GenotypeNameGenusIdUNIQUE`GenotypeName`, `GenusId`
xg_GenusIdINDEX`GenusId`
xg_OriginIdINDEX`OriginId`
xg_SpeciesNameINDEX`SpeciesName`
xg_OwnGroupIdINDEX`OwnGroupId`
xg_AccessGroupIdINDEX`AccessGroupId`
xg_OwnGroupPermINDEX`OwnGroupPerm`
xg_AccessGroupPermINDEX`AccessGroupPerm`
xg_OtherPermINDEX`OtherPerm`


Table: genotypealiasOne genotype may have many historical names (aliases) under which it has been known.

ColNameDatatypePKFKAINNDefaultValueComments
GenotypeAliasIdINTEGERPK AINNgenotype alias id
GenotypeAliasNameVARCHAR(255)   NNgenotype alias name
GenotypeIdINTEGER FK NNgenotype id
GenotypeAliasTypeINTEGER FK  genotype alias type from generaltype table class genotypealias
GenotypeAliasStatusINTEGER FK  status of the alias (e.g. used, preferred, old, etc)
GenotypeAliasLangVARCHAR(15)    language of the genotype alias name
IsGenotypeNameTINYINT   NN0flag if this name is a current genotype name - can point to only single record in all genotype records
GenusIdINTEGER FK NNgenus id - same as for main genotype record - to assure uniqness inside the genus - should be managed by trigger
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`GenotypeAliasId`
xga_GenotypeAliasNameINDEX`GenotypeAliasName`
xga_GenotypeIdINDEX`GenotypeId`
xga_GenotypeAliasTypeINDEX`GenotypeAliasType`
xga_GenotypeAliasStatusINDEX`GenotypeAliasStatus`
xga_GenotypeAliasLangINDEX`GenotypeAliasLang`
xga_GenotypeAliasUniqUNIQUE`GenusId`, `GenotypeAliasName`


Table: genotypefactorAdditional virtual columns for genotype descriptions.

ColNameDatatypePKFKAINNDefaultValueComments
GenotypeIdINTEGERPKFK NNgenotype id
FactorIdINTEGERPKFK NNfactor id
FactorValueVARCHAR(255)   NNvalue
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`GenotypeId`, `FactorId`
FactorIdINDEX`FactorId`


Table: genusLogical group of genotypes, but not necessary strictly botanically related. Also referred to as crop or organism.

ColNameDatatypePKFKAINNDefaultValueComments
GenusIdINTEGERPK AINNgenus id
GenusNameVARCHAR(32)   NNgenus name
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`GenusId`
xg_GenusNameUNIQUE`GenusName`


Table: genotypespecimenMaintains the many to many relationship between genotype and specimen. In situations such as with horticulture it may be necessary to define the specimen (individual plant) using many genotypes (hybrid or chimera plants, e.g. trees which have a different root stock and scion). Enables the definition of more common cases where multiple specimens from a genotype (e.g. individuals grown in different environments) need to be distinguished. Type can be added, but is not mandatory.

ColNameDatatypePKFKAINNDefaultValueComments
GenotypeSpecimenIdINTEGERPK AINNid of the group of genotype and plant combination
SpecimenIdINTEGER FK NNid of the specimen
GenotypeIdINTEGER FK NNid of the genotype
GenotypeSpecimenTypeINTEGER FK  relation to type - useful when a few genotypes compose specimen and one is of type scion and the other is rootstock
InheritanceFlagTINYINT    1flag to point to the genotype from which specimen would inherit permissions in case there is many genotypes for one specimen. Always on for genotypes having one or more specimens.
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`GenotypeSpecimenId`
xgp_genotypeINDEX`GenotypeId`
xgp_specimenINDEX`SpecimenId`
xgp_gstINDEX`GenotypeSpecimenType`
xgp_InheritanceFlagINDEX`InheritanceFlag`


Table: specimenRecord for a specimen, i.e. individual plants or their representative groups. May appear to be artificial (i.e. if it is a representation of the whole genotype) however, provides consistency and allows the sampling of more plants (specimens) from the trial unit, as well as composing plant (specimen) from more than one genotype (e.g. in horticulture). Permissions to records are governed by (inherited from) genotype permissions. Relevant db trigger and DAL code takes care for this feature.

ColNameDatatypePKFKAINNDefaultValueComments
SpecimenIdINTEGERPK AINNIndividual specimen id
BreedingMethodIdINTEGER FK NNid of the breeding method
SourceCrossingIdINTEGER FK  id of the crossing - optional this specimen is a product of this particular cross
SpecimenNameVARCHAR(254)   NNSpecimen name
SpecimenBarcodeVARCHAR(64)    Optional specimen barcode - if assigned could be printed on label
IsActiveTINYINT(2)    1Set to 0 if we want to indicate that it is no longer in production, program or some other binary switch
PedigreeTEXT    Could be generated Purdy string from male and female parent ID (or some other than Purdy standard)
SelectionHistoryVARCHAR(254)    Can be siblings clones etc, where genotype name is the same. pulses use this a lot
FilialGenerationINTEGER    Level of specimens being selfed, required when full selection history is not available
SpecimenNoteTEXT    Comments about specimen if applicable
OwnGroupIdINTEGER   NNgroup id which owns the record
AccessGroupIdINTEGER   NN0group id which can access the recrod (different than own group)
OwnGroupPermTINYINT   NNpermission for group owning the record
AccessGroupPermTINYINT   NN0permission for access group
OtherPermTINYINT   NN0permission for all other system users
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`SpecimenId`
xs_SpecimenNameUNIQUE`SpecimenName`
xs_SpecimenBarcodeUNIQUE`SpecimenBarcode`
xs_BreedingMethodIdINDEX`BreedingMethodId`
xs_IsActiveINDEX`IsActive`
xs_OwnGroupIdINDEX`OwnGroupId`
xs_AccessGroupIdINDEX`AccessGroupId`
xs_OwnGroupPermINDEX`OwnGroupPerm`
xs_AccessGroupPermINDEX`AccessGroupPerm`
xs_OtherPermINDEX`OtherPerm`
xs_SourceCrossingIdINDEX`SourceCrossingId`


Table: specimenfactorAdditional virtual columns for specimens.

ColNameDatatypePKFKAINNDefaultValueComments
SpecimenIdINTEGERPKFK NNspecimen id
FactorIdINTEGERPKFK NNfactor id
FactorValueVARCHAR(255)   NNvalue
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`SpecimenId`, `FactorId`
FactorIdINDEX`FactorId`


Table: pedigreeTable, which defines specimen (genotype) pedigrees (genealogy). This design assumes that one specimen may have more than 2 parents, which is never a case in reality, but in some scenarios (e.g. bulk pollination) this kind of information may need to be preserved.

ColNameDatatypePKFKAINNDefaultValueComments
PedigreeIdINTEGERPK AINNinternal record id
SpecimenIdINTEGER FK NNid of the specimen
ParentSpecimenIdINTEGER FK NNid of another specimen, which is its parent
ParentTypeINTEGER FK NNParent type (male female self) or others as in generaltype table in class parent
ParentTrialUnitSpecimenIdINTEGER FK  id of the trial unit specimen
SelectionReasonVARCHAR(100)    Short description (optional) why the selection was made
NumberOfSpecimensINTEGER    Number of Specimens: The number of a specific parent specimen used in a breeding process to make progeny specimen. e.g. FemaleSpecimenName: F; MaleSpecimenName: M; 1xF is crossed with 20xM; Pedigree holds: NumberOfSpecimens Female F is 1; NumberOfSpecimens Male M is 20
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`PedigreeId`
xpe_SpecimenIdINDEX`SpecimenId`
xpe_ParentSpecimenIdINDEX`ParentSpecimenId`
xpe_ParentTypeINDEX`ParentType`
xpe_SpPaTypeUNIQUE`SpecimenId`, `ParentSpecimenId`, `ParentType`
xpe_ParentTrialUnitSpecimenIdINDEX`ParentTrialUnitSpecimenId`


Table: genotypealiasfactorAdditional info about genotype aliases

ColNameDatatypePKFKAINNDefaultValueComments
GenotypeAliasIdINTEGERPKFK NNgenotype alias id
FactorIdINTEGERPKFK NNfactor id
FactorValueVARCHAR(255)   NNfactor value
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`GenotypeAliasId`, `FactorId`
FactorIdINDEX`FactorId`


Table: genpedigreeThis is the same as pedigree table for specimen, but allows to keep pedigree at genotype level if needed - e.g. some generalization is required, while specimen pedigree can be utilized for e.g. selection history only. Gives flexibility to users to select one or use both constructs to track parent/child relationships.

ColNameDatatypePKFKAINNDefaultValueComments
GenPedigreeIdINTEGERPK AINNGenPedigree id
GenotypeIdINTEGER FK NNid of the genotype
ParentGenotypeIdINTEGER FK NNid of the parent genotype
GenParentTypeINTEGER FK NNwhat is the type of parent (e.g. male, female, self, etc)
NumberOfGenotypesINTEGER    optional number of parent genotypes perhaps useful to store
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`GenPedigreeId`
xgp_GenotypeIdINDEX`GenotypeId`
xgp_ParentGenotypeIdINDEX`ParentGenotypeId`
xgp_GenParentTypeINDEX`GenParentType`
xgp_GePaTypeUNIQUE`GenotypeId`, `ParentGenotypeId`, `GenParentType`


Table: specimenkeywordkeywords for a specimen

ColNameDatatypePKFKAINNDefaultValueComments
SpecimenKeywordIdINTEGERPK AINNspecimen keyword id
KeywordIdINTEGER FK NNkeyword id for a specimen
SpecimenIdINTEGER FK NNspecimen id
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`SpecimenKeywordId`
sky_KeywordIdINDEX`KeywordId`
sky_SpecimenIdINDEX`SpecimenId`


Table: taxonomyTaxonomy hierarchy. Store simple internal taxonomy information from species up and/or link to external taxonomy resources.

ColNameDatatypePKFKAINNDefaultValueComments
TaxonomyIdINTEGERPK AINNtaxonomy id - internal id of this database
ParentTaxonomyIdINTEGER FK  parent taxonomy id - what is directly above in hierarchy
TaxonomyNameINTEGER   NNmain name used
TaxonomyClassVARCHAR(255)   NNclass - species, genera, kingdom
TaxonomySourceVARCHAR(255)    source of taxonomy data - e.g. NCBI, AviBase, World Flora Onlie
TaxonomyExtIdVARCHAR(254)    id in the external source - e.g. tax_id from NCBI
TaxonomyURLVARCHAR(254)    api endpoint or permalink to fetch information
TaxonomyNoteTEXT    aliased name and extra information
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TaxonomyId`
xtax_ParentTaxonomyIdINDEX`ParentTaxonomyId`
xtax_TaxonomyNameINDEX`TaxonomyName`
xtax_TaxonomyClassINDEX`TaxonomyClass`


[BACK TO TOP]

Region: Sample inventoryInventory of samples, seeds, tissues, etc

Table: itemItems, such as seed bags, stored in the inventory. A generic term and may be used for as inventory for a variety of material.

ColNameDatatypePKFKAINNDefaultValueComments
ItemIdINTEGERPK AINNId of the stored item
TrialUnitSpecimenIdINTEGER FK  trial unit specimen id
UnitIdINTEGER FK  Id of the unit if known for the item
ItemSourceIdINTEGER FK  Id of the contact (who is the external source)
ContainerTypeIdINTEGER FK  id of the container type
SpecimenIdINTEGER FK NNid of the specimen (bit redundant with trial unit specimen, but since this it may not be present then at least specimen info is there)
ScaleIdINTEGER FK  id of the device used to take measurement
StorageIdINTEGER FK  id of the storage location
ItemTypeIdINTEGER FK NNtype of the item
ItemStateIdINTEGER FK  id of the state description (e.g. damaged, thrown away, etc)
ItemBarcodeVARCHAR(32)    barcode on the item container
AmountDECIMAL(16,3)    amount of the item in container
DateAddedDATETIME   NNdate time when added
AddedByUserIdINTEGER FK NNwho added
LastMeasuredDateDATETIME    date time when last updated
LastMeasuredUserIdINTEGER    who last updated
ItemOperationSET('subsample','group')    in case item is derived from other items by taking sample or grouping (mixing) this can be defined here. Item parentage is defined in itemparent table
ItemNoteVARCHAR(254)    some comments
LastUpdateTimeStampDATETIME   NNlast update time
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`ItemId`
xi_ScaleIdINDEX`ScaleId`
xi_StorageIdINDEX`StorageId`
xi_ItemTypeIdINDEX`ItemTypeId`
xi_ItemBarcodeUNIQUE`ItemBarcode`
xi_AddedByUserIdINDEX`AddedByUserId`
xi_LastMeasuredUserIdINDEX`LastMeasuredUserId`
xi_DateAddedINDEX`DateAdded`
xi_LastMeasuredDateINDEX`LastMeasuredDate`
xi_ItemStateIdINDEX`ItemStateId`
xi_ItemSourceIdINDEX`ItemSourceId`
xi_ContainerTypeIdINDEX`ContainerTypeId`
xi_SpecimenIdINDEX`SpecimenId`
xi_UnitIdINDEX`UnitId`
xi_TrialUnitSpecimenIdINDEX`TrialUnitSpecimenId`


Table: itemfactorAdditional virtual columns for items.

ColNameDatatypePKFKAINNDefaultValueComments
ItemIdINTEGERPKFK NNitem id
FactorIdINTEGERPKFK NNvirtual column id
FactorValueVARCHAR(254)   NNvalue in column for an item id
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`ItemId`, `FactorId`
FactorIdINDEX`FactorId`


Table: itemgroupArbitrary Grouping of inventory items which may assist future retrieval, e.g. to group bags to be later sown in a trial.

ColNameDatatypePKFKAINNDefaultValueComments
ItemGroupIdINTEGERPK AINNItem group id
ItemGroupNameVARCHAR(64)   NNitem group name
ItemGroupNoteVARCHAR(254)    comments about item group
AddedByUserINTEGER    system user id, who created item group
DateAddedDATETIME   NNdate time when item group added
ActiveTINYINT(1)   NN1flag if group active
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`ItemGroupId`
xig_ItemGroupNameUNIQUE`ItemGroupName`
xig_AddedByUserINDEX`AddedByUser`


Table: itemgroupentryMaintains the many to many relationship between the item and itemgroup tables.

ColNameDatatypePKFKAINNDefaultValueComments
ItemIdINTEGER FK NNitem id
ItemGroupIdINTEGER FK NNitem group id
IndexNameIndexTypeColumns
xige_ItemIdINDEX`ItemId`
xige_ItemGroupIdINDEX`ItemGroupId`


Table: itemparentThis is a bit complex, but allows full flexibility of splitting one item into many as well as grouping many items into one. Full trace of how the inventory items has been rearranged.

ColNameDatatypePKFKAINNDefaultValueComments
ItemParentIdINTEGERPK AINNinternal id
ItemParentTypeINTEGER FK NNitem parent type (different than parent type in generaltype table) class - itemparent
ItemIdINTEGER FK NNnewly created item id from other items
ParentIdINTEGER FK NNitem id of the parent item
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`ItemParentId`
xip_ItemIdINDEX`ItemId`
xip_ParentIdINDEX`ParentId`
xip_ItemParentTypeINDEX`ItemParentType`
xip_ItemIDParentIDUNIQUE`ItemId`, `ParentId`


Table: itemlogLogging actions, changes done to each inventory item

ColNameDatatypePKFKAINNDefaultValueComments
ItemLogIdINTEGERPK AINNitem log id
LogTypeIdINTEGER FK NNtype, action to log
SystemUserIdINTEGER FK NNwho did/log that action
ItemIdINTEGER FK NNitem it was logged for
LogDateTimeDATETIME   NNdate time of action
LogMessageVARCHAR(254)   NNmessage or info logged
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`ItemLogId`
xil_LogTypeIdINDEX`LogTypeId`
xil_SystemUserIdINDEX`SystemUserId`
xil_ItemIdINDEX`ItemId`
xil_LogDateTimeINDEX`LogDateTime`


[BACK TO TOP]

Region: Sample values

Table: samplemeasurementMeasurement of the sample from trial unit for a particular trait/variate, by the operator on certain date/time. Measurement can be done for sample type if it does not refer to the entire trial unit.

ColNameDatatypePKFKAINNDefaultValueComments
TrialUnitIdINTEGERPKFK NNtrial unit id
TraitIdINTEGERPKFK NNid of the trait being measured
OperatorIdINTEGERPKFK NNuser performing the measurement
InstanceNumberTINYINTPK  NN1next consecutive number of the measurement instance if all other values of primary key are the same
SampleTypeIdINTEGERPKFK NNsample type id
SMGroupIdINTEGERPKFK NN0sample measurement group the measurement if part of - if any
TrialUnitSpecimenIdINTEGERPKFK NNoptional value of trial unit specimen link if measurement is at the level of sub-trialunit
SurveyIdINTEGER FK  optional value of survey id - if data point comes from a particular survey
MeasureDateTimeDATETIME   NNdate / time of the measurement
TraitValueVARCHAR(255)   NNmeasurement value
StateReasonVARCHAR(30)    optional value state e.g. reason for rejection
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TrialUnitId`, `TraitId`, `OperatorId`, `InstanceNumber`, `SampleTypeId`, `SMGroupId`, `TrialUnitSpecimenId`
xsm_OperatorIdINDEX`OperatorId`
xsm_TraitIdINDEX`TraitId`
xsm_MeasureDateTimeINDEX`MeasureDateTime`
xsm_SampleTypeIdINDEX`SampleTypeId`
xsm_SMGroupIdINDEX`SMGroupId`
xsm_TrialUnitSpecimenIdINDEX`TrialUnitSpecimenId`
xsm_SurveyIdINDEX`SurveyId`
xsm_TrialUnitIdINDEX`TrialUnitId`


Table: smgroupSample measurements for some portions of the trials may be grouped to distinct them from the same measurements, which were done before, but need to be retained or to have two sets which can be compared. It can also be used as means to keep several versions of the same dataset

ColNameDatatypePKFKAINNDefaultValueComments
SMGroupIdINTEGERPK AINNinternal group id
SMGroupNameVARCHAR(254)   NNgroup name - has to be unique
TrialIdINTEGER FK NNtrial id measurements belong to - this is a constrain that grouping measurements between trials is not possible
OperatorIdINTEGER FK NNuser - owner of the group
SMGroupStatusVARCHAR(20)    status of the group
SMGroupDateTimeDATETIME   NNdate and time of the group - possibly creation time or last update
SMGroupNoteTEXT    general comments for the group
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`SMGroupId`
smg_SMGroupNameUNIQUE`SMGroupName`
smg_TrialIdINDEX`TrialId`
smg_OperatorIdINDEX`OperatorId`
smg_SMGroupDateTimeINDEX`SMGroupDateTime`
smg_SMGroupStatusINDEX`SMGroupStatus`


Table: itemmeasurementMeasurement of the sample from item inventory for a particular trait/variate, by the operator on certain date/time. Measurement can be done for sample type if it does not refer to the entire inventory item.

ColNameDatatypePKFKAINNDefaultValueComments
ItemIdINTEGERPKFK NNitem id
TraitIdINTEGERPKFK NNid of the trait being measured
OperatorIdINTEGERPKFK NNuser performing the measurement
InstanceNumberINTEGERPK  NN1next consecutive number of the measurement instance if all other values of primary key are the same
SampleTypeIdINTEGERPKFK NNsample type id
IMGroupIdINTEGERPKFK NN0sample measurement group the measurement if part of - if any
MeasureDateTimeDATETIME    date / time of the measurement
TraitValueVARCHAR(255)    measurement value
StateReasonVARCHAR(255)    optional value state e.g. reason for rejection
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`ItemId`, `TraitId`, `OperatorId`, `InstanceNumber`, `SampleTypeId`, `IMGroupId`
xim_TraitIdINDEX`TraitId`
xim_OperatorIdINDEX`OperatorId`
xim_SampleTypeIdINDEX`SampleTypeId`
xim_IMGroupIdINDEX`IMGroupId`
xim_MeasureDateTimeINDEX`MeasureDateTime`


Table: imgroupItem measurements for some portions of the item data may be grouped to distinct them from the same measurements, which were done before, but need to be retained or to have two sets which can be compared. It can also be used as means to keep several versions of the same dataset.

ColNameDatatypePKFKAINNDefaultValueComments
IMGroupIdINTEGERPK AINNinternal group id
IMGroupNameVARCHAR(255)   NNgroup name - has to be unique
OperatorIdINTEGER FK NNuser - owner of the group
IMGroupStatusVARCHAR(20)    status of the group
IMGroupDateTimeDATETIME   NNdate and time of the group - possibly creation time or last update
IMGroupNoteTEXT    general comments for the group
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`IMGroupId`
ximg_IMGroupNameUNIQUE`IMGroupName`
ximg_OperatorIdINDEX`OperatorId`
ximg_IMGroupStatusINDEX`IMGroupStatus`
ximg_IMGroupDateTimeINDEX`IMGroupDateTime`


Table: crossingmeasurementMeasurement of the sample from crossing for a particular trait/variate, by the operator on certain date/time. Measurement can be done for sample type if it does not refer to the entire crossing.

ColNameDatatypePKFKAINNDefaultValueComments
CrossingIdINTEGERPKFKAINNcrossing id
TraitIdINTEGERPKFK NNid of the trait being measured
OperatorIdINTEGERPKFK NNuser performing the measurement
InstanceNumberTINYINTPK  NNnext consecutive number of the measurement instance if all other values of primary key are the same
SampleTypeIdINTEGERPKFK NNsample type id
CMGroupIdINTEGERPKFK NNcrossing measurement group the measurement if part of - if any
MeasureDateTimeDATETIME    date / time of the measurement
TraitValueVARCHAR(255)    measurement value
StateReasonVARCHAR(30)    optional value state e.g. reason for rejection
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`CrossingId`, `TraitId`, `OperatorId`, `InstanceNumber`, `SampleTypeId`, `CMGroupId`
xcm_TraitIdINDEX`TraitId`
xcm_OperatorIdINDEX`OperatorId`
xcm_SampleTypeIdINDEX`SampleTypeId`
xcm_MeasureDateTimeINDEX`MeasureDateTime`
xcm_CMGroupIdINDEX`CMGroupId`


Table: cmgroupCrossing measurements for some portions of the trials may be grouped to distinct them from the same measurements, which were done before, but need to be retained or to have two sets which can be compared. It can also be used as means to keep several versions of the same dataset.

ColNameDatatypePKFKAINNDefaultValueComments
CMGroupIdINTEGERPK AINNinternal group id
CMGroupNameVARCHAR(255)   NNgroup name - has to be unique
TrialIdINTEGER FK NNtrial id measurements belong to - this is a constrain that grouping measurements between trials is not possible
OperatorIdINTEGER FK NNuser - owner of the group
CMGroupStatusVARCHAR(20)    status of the group
CMGroupDateTimeDATETIME   NNdate and time of the group - possibly creation time or last update
CMGroupNoteTEXT    general comments for the group
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`CMGroupId`
xcmg_CMGroupNameUNIQUE`CMGroupName`
xcmg_TrialIdINDEX`TrialId`
xcmg_OperatorIdINDEX`OperatorId`
xcmg_CMGroupStatusINDEX`CMGroupStatus`
xcmg_CMGroupDateTimeINDEX`CMGroupDateTime`


[BACK TO TOP]

Region: Site and projectSite and projects related group of tables. Spatial and logical groups of trials.

Table: siteTable storing sites, which may be whole farms, breeding stations or other general environmentally homogeneous areas, where planting occurs. Exact site geographic location is stored in siteloc table.

ColNameDatatypePKFKAINNDefaultValueComments
SiteIdINTEGERPK AINNsite id
SiteTypeIdINTEGER FK NNsite type id
SiteNameVARCHAR(64)   NNname
SiteAcronymVARCHAR(5)   NNshort name of the site, can be used as e.g. part of the trial naming convention
CurrentSiteManagerIdINTEGER FK NNperson currently managing the site, not necessarily a user of this system, so linked to the contactId
SiteStartDateDATETIME    Date when site started to exist
SiteEndDateDATETIME    Date when site stopped to exist
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`SiteId`
xs_SiteNameINDEX`SiteName`
xs_CurrentSiteManagerIdINDEX`CurrentSiteManagerId`
xs_SiteAcronymINDEX`SiteAcronym`
xs_SiteStartDateINDEX`SiteStartDate`
xs_SiteEndDateINDEX`SiteEndDate`


Table: sitefactorAdditional virtual columns for site table.

ColNameDatatypePKFKAINNDefaultValueComments
SiteIdINTEGERPKFK NNsite id
FactorIdINTEGERPKFK NNfactor id
FactorValueVARCHAR(255)   NNvalue
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`SiteId`, `FactorId`
FactorIdINDEX`FactorId`


Table: projectA very generic table to enable the grouping of trials according to some organisational distinction. Projects may have very different requirements therefore it maybe more appropriate to use the factor column to standardise data within the organisation.

ColNameDatatypePKFKAINNDefaultValueComments
ProjectIdINTEGERPK AINNproject id
ProjectManagerIdINTEGER FK NNmanager of the project, link to contact table
TypeIdINTEGER FK NNproject type, link to general type table class project
ProjectNameVARCHAR(254)   NNproject name
ProjectStatusVARCHAR(254)    project status (e.g. stage 2, confirmed, discontinued, etc)
ProjectStartDateDATETIME    start project date
ProjectEndDateDATETIME    end project date
ProjectNoteTEXT    project general description
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`ProjectId`
xp_ProjectManagerIdINDEX`ProjectManagerId`
xp_TypeIdINDEX`TypeId`
xp_ProjectNameUNIQUE`ProjectName`
xp_ProjectStartDateINDEX`ProjectStartDate`
xp_ProjectEndDateINDEX`ProjectEndDate`
xp_ProjectStatusINDEX`ProjectStatus`


Table: projectfactorAdditional virtual columns for projects.

ColNameDatatypePKFKAINNDefaultValueComments
ProjectIdINTEGERPKFK NNproject id
FactorIdINTEGERPKFK NNfactor id
FactorValueVARCHAR(254)   NNvalue for project factor
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`ProjectId`, `FactorId`
FactorIdINDEX`FactorId`


[BACK TO TOP]

Region: Specimen groupsListing of specimen groups

Table: specimengroupDefines a name for a group of specimens. Possible applications can be: many plants which went through selfing process; groups for next years testing; groups for genotyping.

ColNameDatatypePKFKAINNDefaultValueComments
SpecimenGroupIdINTEGERPK AINNid of the group of specimens
SpecimenGroupStatusINTEGER FK  current status of specimen group
SpecimenGroupTypeIdINTEGER FK NNid of the specimen group type
SpecimenGroupNameVARCHAR(64)   NNgroup name
SpecimenGroupNoteVARCHAR(254)    description
SpecimenGroupCreatedDATETIME   NNdate time when group was created
SpecimenGroupLastUpdateDATETIME    date time when group was last updated
OwnGroupIdINTEGER    group id which owns the record
AccessGroupIdINTEGER    Group id allowed to access specimen group
OwnGroupPermTINYINT    permission for the own group members
AccessGroupPermTINYINT    permission for the access group members
OtherPermTINYINT    permission for all the other system users
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`SpecimenGroupId`
xsg_SpecimenGroupTypeIdINDEX`SpecimenGroupTypeId`
xsg_SpecimenGroupNameUNIQUE`SpecimenGroupName`
xsg_SpecimenGroupStatusINDEX`SpecimenGroupStatus`
xsg_SpecimenGroupCreatedINDEX`SpecimenGroupCreated`
xsg_SpecimenGroupLastUpdateINDEX`SpecimenGroupLastUpdate`
xsg_AccessGroupIdINDEX`AccessGroupId`
xsg_AccessGroupPermINDEX`AccessGroupPerm`
xsg_OwnGroupIdINDEX`OwnGroupId`
xsg_OwnGroupPermINDEX`OwnGroupPerm`
xsg_OtherPermINDEX`OtherPerm`


Table: specimengroupentryMaintains the many to many relationship between specimens and specimens groups.

ColNameDatatypePKFKAINNDefaultValueComments
SpecimenGroupEntryIdINTEGERPK AINNentry id
SpecimenIdINTEGERPKFK NNspecimen id
SpecimenGroupIdINTEGERPKFK NNspecimen group id
SpecimenNoteVARCHAR(254)    special note for this specimen in the group
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`SpecimenGroupEntryId`, `SpecimenId`, `SpecimenGroupId`
xsge_SpecimenIdINDEX`SpecimenId`
xsge_SpecimenGroupIdINDEX`SpecimenGroupId`


[BACK TO TOP]

Region: Survey

Table: surveySurvey entity represents field data collection expedition. System users may arbitrary select points of interest (trial units) to visit in arbitrary order. This entity is for planning physical data collection events as well as for calculating an effort in such events.

ColNameDatatypePKFKAINNDefaultValueComments
SurveyIdINTEGERPK AINNInternal survey id
SurveyManagerIdINTEGER FK NNContact that is assigned as a survey manager
SurveyNameVARCHAR(255)   NNSurvey name
SurveyStartTimeDATETIME   NNSurvey start time
SurveyEndTimeDATETIME    Survey end time
SurveyNoteTEXT    Survey notes and comments
SurveyTypeIdINTEGER FK  Type of Survey
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`SurveyId`
xs_SurveryNameUNIQUE`SurveyName`
xs_SurveryStartTimeINDEX`SurveyStartTime`
xs_SurveryEndTimeINDEX`SurveyEndTime`
xs_SurveyManagerIdINDEX`SurveyManagerId`


Table: surveytraitLinking survey and traits - which traits will be scored during the survey. Can be a subset of traits for trials (experiments) involved, but can also be an arbitrary selection.

ColNameDatatypePKFKAINNDefaultValueComments
SurveyTraitIdINTEGERPK AINNInternal survey trait id
SurveyIdINTEGER FK NNSurvey Id
TraitIdINTEGER FK NNTrait Id
CompulsoryTINYINT   NN0Flag if scoring the trait is compulsory - by default it is not
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`SurveyTraitId`
xst_SurveryIdINDEX`SurveyId`
xst_TraitIdINDEX`TraitId`


Table: surveytrialunitLinking survey with trial unit visited during the survey.

ColNameDatatypePKFKAINNDefaultValueComments
SurveyTrialUnitIdINTEGERPK AINNinternal survey trial unit id
SurveyIdINTEGER FK NNsurvey id
TrialUnitIdINTEGER FK NNtrial unit
VisitTimeDATETIME   NNvisit time
VisitOrderINTEGER    consecutive order number during the visit
CollectorIdINTEGER FK  id of the person who collected data
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`SurveyTrialUnitId`
xstu_SurveyIdINDEX`SurveyId`
xstu_TrialUnitIdINDEX`TrialUnitId`
xstu_VisitTimeINDEX`VisitTime`
xstu_VisitOrderINDEX`VisitOrder`
xstu_CollectorIdINDEX`CollectorId`


Table: surveyfactorAdditional virtual columns for genotype descriptions.

ColNameDatatypePKFKAINNDefaultValueComments
SurveyIdINTEGERPKFK NNSurvey Id
FactorIdINTEGERPKFK NNFactor Id
FactorValueVARCHAR(254)   NNvalue
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`SurveyId`, `FactorId`
FactorIdINDEX`FactorId`


[BACK TO TOP]

Region: System, users and contacts AUsers, contacts and organisations

Table: contactList of general contacts (not only system users, but also collaborators, material providers, site managers, etc). Links with organisation.

ColNameDatatypePKFKAINNDefaultValueComments
ContactIdINTEGERPK AINNcontact id
ContactLastNameVARCHAR(64)   NNlast name
ContactFirstNameVARCHAR(32)   NNfirst name
ContactAcronymVARCHAR(32)    acronym
ContactAddressVARCHAR(128)    address
ContactTelephoneVARCHAR(14)    phone number
ContactMobileVARCHAR(14)    mobile number
ContactEMailVARCHAR(255)    e-mail
OrganisationIdINTEGER FK NNorganisation id
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`ContactId`
xc_LastFirstNameINDEX`ContactLastName`, `ContactFirstName`
xc_OrganisationIdINDEX`OrganisationId`
xc_ContactEMailINDEX`ContactEMail`


Table: contactfactorAdditional virtual columns for contacts.

ColNameDatatypePKFKAINNDefaultValueComments
ContactIdINTEGERPKFK NNcontact id
FactorIdINTEGERPKFK NNfactor id
FactorValueVARCHAR(255)   NNvalue
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`ContactId`, `FactorId`
FactorIdINDEX`FactorId`


Table: organisationList of collaborating and internal and/or external organisations.

ColNameDatatypePKFKAINNDefaultValueComments
OrganisationIdINTEGERPK AINNorganisation id
OrganisationNameVARCHAR(64)   NNorganisation name
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`OrganisationId`
xo_OrganisationNameUNIQUE`OrganisationName`


Table: systemuserList of the system users who are authorised to access the system.

ColNameDatatypePKFKAINNDefaultValueComments
UserIdINTEGERPK AINNuser id
UserNameVARCHAR(32)   NNuser name
UserPasswordVARCHAR(128)   NNuser password
PasswordSaltVARCHAR(64)   NNpassword salt (used to hash/encrypt password?)
ContactIdINTEGER FK NNcontact id
LastLoginDateTimeDATETIME    date and time of last logon
UserPreferenceTEXT    what preferences are stored here and in what format?
UserTypeVARCHAR(20)   NNdistinguish between humans and mechanical devices for data input or processing
UserVerificationVARCHAR(255)    token for password reset
UserVerificationDTDATETIME    password reset date and time
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`UserId`
xsu_UserNameUNIQUE`UserName`
xsu_ContactIdINDEX`ContactId`


Table: organisationfactorAdditional columns for organisations if needed

ColNameDatatypePKFKAINNDefaultValueComments
OrganisationIdINTEGERPKFK NNorganisation id
FactorIdINTEGERPKFK NNfactor id
FactorValueVARCHAR(254)   NNfactor value
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`OrganisationId`, `FactorId`
FactorIdINDEX`FactorId`


[BACK TO TOP]

Region: System, workflow, configuration and multimedia (B)System - workflow definitions and multimedia, units and vocabularies, storage, etc

Table: activitylogA log of system user activities

ColNameDatatypePKFKAINNDefaultValueComments
ActivityLogIdINTEGERPK AINNactivity log id
UserIdINTEGER FK NNuser id
ActivityDateTimeDATETIME   NNdate time of the activity
ActivityLevelINTEGER(10)   NNLogout=2,Incorrect Password=3, Edit=101,Delete=102
ActivityTextVARCHAR(254)   NNdescription of activity
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`ActivityLogId`
xal_UserIdINDEX`UserId`


Table: authorisedsystemgroupList of users in system group.

ColNameDatatypePKFKAINNDefaultValueComments
AuthorisedSystemGroupIdINTEGERPK AINNauthorised system group id
UserIdINTEGER FK NNuser id
SystemGroupIdINTEGER FK NNsystem group id
IsGroupOwnerTINYINT   NNflag [0|1] if the user group owner.
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`AuthorisedSystemGroupId`
xasg_UserIdINDEX`UserId`
xasg_SystemGroupIdINDEX`SystemGroupId`
xasg_IsGroupOwnerINDEX`IsGroupOwner`


Table: systemgroupDefinitions of system groups. Most important in setting record level privileges for many entities.

ColNameDatatypePKFKAINNDefaultValueComments
SystemGroupIdINTEGERPK AINNsystem group id
SystemGroupNameVARCHAR(64)   NNsystem group name
SystemGroupDescriptionVARCHAR(255)   NNsystem group description
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`SystemGroupId`
xsg_SystemGroupNameUNIQUE`SystemGroupName`


Table: deviceregisterRegister of devices, which have access to the database to supply data. Devices to include those that supply environmental data or seed inventory data (e.g. scales) and extend to those that supply for phenotypic measurements. One device can record more than one data type / parameter to more than one environment layer.

ColNameDatatypePKFKAINNDefaultValueComments
DeviceRegisterIdINTEGERPK AINNInternal id
DeviceTypeIdINTEGER FK NNdevice type id
DeviceIdVARCHAR(100)   NNUnique device name / id under which it is registered in database
DeviceNoteVARCHAR(255)    Description of the device
LatitudeDECIMAL(16,14)    Latitude of the device in decimal degrees (-90, 90)
LongitudeDECIMAL(16,13)    Longitude of the device in decimal degrees (-180, 180)
DeviceConfTEXT    Device configuration store - can be object e.g. json or yaml string etc
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`DeviceRegisterId`
xdr_DeviceIdUNIQUE`DeviceId`
xdr_DeviceTypeIdINDEX`DeviceTypeId`


Table: storageGeneral storage locations in a tree like hierarchy. Allows construction of locations such as: - Building 1 - Room 7 - Rack 5 - Shelf 299.

ColNameDatatypePKFKAINNDefaultValueComments
StorageIdINTEGERPK AINNid of the storage position
StorageBarcodeVARCHAR(64)    barcode of the storage position
StorageLocationVARCHAR(32)   NNlocation of the storage (e.g. building, room, freezer, shelf, etc)
StorageParentIdINTEGER FK  id of the parent storage (e.g. for room parent storage could be building where the room is located)
StorageDetailsVARCHAR(254)    more info about a storage
StorageNoteVARCHAR(254)    detailed storage description
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`StorageId`
xs_StorageBarcodeUNIQUE`StorageBarcode`
xs_StorageLocationINDEX`StorageLocation`
xs_StorageParentIdINDEX`StorageParentId`


Table: generalunitDefines the units used in various places in the system

ColNameDatatypePKFKAINNDefaultValueComments
UnitIdINTEGERPK AINNunit id
UnitTypeIdINTEGER FK  optional FK to type (e.g. weight, temperature, length etc) - class unittype
UnitNameVARCHAR(12)   NNunit name (e.g. kg, dkg, etc)
UnitNoteVARCHAR(254)    some description
UnitSourceVARCHAR(254)    source infromation, convention, etc
UseByItemTINYINT   NN0flag if want to use for item records
UseByTraitTINYINT   NN0flag if want to use for trait records
UseByTrialEventTINYINT   NN0flag if want to use for trial event records
UseBylayerattribTINYINT   NN0flag if want to use in layer attributes in enviro module
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`UnitId`
xu_UnitNameUNIQUE`UnitName`
xu_UnitTypeIdINDEX`UnitTypeId`
xu_UseByItemINDEX`UseByItem`
xu_UseByTraitINDEX`UseByTrait`
xu_UseByTrialEventINDEX`UseByTrialEvent`
xu_UseBylayerattribINDEX`UseBylayerattrib`


Table: deviceregisterfactorAdditional virtual columns values for deivceregister.

ColNameDatatypePKFKAINNDefaultValueComments
DeviceRegisterIdINTEGERPKFK NNdevice register id
FactorIdINTEGERPKFK NNvirtual column id
FactorValueVARCHAR(254)   NNvalue for column and device id
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`DeviceRegisterId`, `FactorId`
FactorIdINDEX`FactorId`


Table: generaltypeContains global vocabularies of types to support classification. The class column lists the possible classes of types. It also spans to types in Marker Module. With one exception of designtype table for trial all columns named *type refer to particular class of the types in this table. There are also some *status classifications contained here. Classes are: site, item, container, deviceregister, trial, operation, sample, specimengroup, specimengroupstatus, state, parent, itemparent, genotypespecimen, markerdataset, workflow, project, itemlog, plate, genmap, multimedia, tissue, genotypealias, genparent, genotypealiasstatus, traitgroup, unittype, trialgroup, breedingmethod, traitdatatype, season, trialunit, survey, extractdatatype

ColNameDatatypePKFKAINNDefaultValueComments
TypeIdINTEGERPK AINNgeneral type id
ClassSET('site','item','container','deviceregister','trial','trialevent','sample','specimengroup','specimengroupstatus','state','parent','itemparent','genotypespecimen','markerdataset','workflow','project','itemlog','plate','genmap','multimedia','tissue','genotypealias','genparent','genotypealiasstatus','traitgroup','unittype','trialgroup','breedingmethod','traitdatatype','season','trialunit','survey','extractdatatype')   NNclass of type - possible values (site, item, container, deviceregister, trial, operation, sample, specimengroup, specimengroupstatus, state, parent, itemparent, genotypespecimen, markerdataset, workflow, project, itemlog, plate, genmap, multimedia, tissue, genotypealias, genparent, genotypealiasstatus, traitgroup, unittype, trialgroup, breedingmethod, traitdatatype, season, trialunit, survey, extractdatatype)
TypeNameVARCHAR(100)   NNname of the type within notation
TypeNoteVARCHAR(254)    type description
IsTypeActiveTINYINT(1)   NN10|1 flag to indicate if type is active (can be used)
IsFixedTINYINT(1)   NN00|1 flag to indicate if all values in the record should stay fixed
TypeMetaDataTEXT    metadata of type to better describe usage of type
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TypeId`
xgt_ClassTypeNameUNIQUE`Class`, `TypeName`
xgt_TypeNameINDEX`TypeName`
xgt_IsTypeActiveINDEX`IsTypeActive`


Table: generaltypefactorAdditional virtual columns for genotypes descriptions.

ColNameDatatypePKFKAINNDefaultValueComments
TypeIdINTEGERPKFK NNtype id
FactorIdINTEGERPKFK NNvirtual column id
FactorValueVARCHAR(254)   NNvalue of the virtual column
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TypeId`, `FactorId`
FactorIdINDEX`FactorId`


Table: barcodeconfTable to store the configuration for barcodes used in the system. DAL should accept any barcode string in any table as long as it is unique. This table is an optional storage of information on how to generate barcode string automatically. Conventions for definitions are a subject for separate documentation.

ColNameDatatypePKFKAINNDefaultValueComments
BarcodeConfIdINTEGERPK AINNconfiguration id
SystemTableVARCHAR(32)   NNconfiguration is for this table in the system
SystemFieldVARCHAR(32)   NNconfiguration is for this field (in the SystemTable)
BarcodeCodeVARCHAR(12)   NNName of barcode system (e.g. EAN13, Code39, QR, etc)
BarcodeDefTEXT   NNString with barcode definition
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`BarcodeConfId`


Table: workflowContains workflows used in the system for trial workflows and can also be used to link to other processes. Caters for the definition of multiple workflows for different situations.

ColNameDatatypePKFKAINNDefaultValueComments
WorkflowIdINTEGERPK AINNworkflow internal id
WorkflowNameVARCHAR(100)   NNworkflow name
WorkflowTypeINTEGER FK NNworkflow type
WorkflowNoteVARCHAR(254)    some description about workflow
IsActiveINTEGER   NN1flag if it is active
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`WorkflowId`
wf_nameUNIQUE`WorkflowName`
wf_typeINDEX`WorkflowType`
wf_activeINDEX`IsActive`


Table: workflowdefList of steps for a workflow. StepOrder allows steps to be sorted as required.

ColNameDatatypePKFKAINNDefaultValueComments
WorkflowdefIdINTEGERPK AINNworkflow step id
WorkflowIdINTEGER FK NNworkflow id - this step is part of
StepNameVARCHAR(100)   NNstep name
StepOrderTINYINT   NN0step order
StepNoteVARCHAR(254)    step description
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`WorkflowdefId`
wfd_workflowINDEX`WorkflowId`
wfd_nameINDEX`StepName`
wfd_workflownameUNIQUE`WorkflowId`, `StepName`
wfd_workfloworderUNIQUE`WorkflowId`, `StepOrder`


Table: multimediaThis table stores references for multimedia files stored in KDDart system. Files will be attached to particular records in other tables, to e.g. illustrate processes, events or document.

ColNameDatatypePKFKAINNDefaultValueComments
MultimediaIdINTEGERPK AINNinternal id
SystemTableSET('genotype', 'specimen', 'project', 'site', 'trial', 'trialunit', 'item', 'extract', 'survey')   NNname of the supported system table, for which file is attached
RecordIdINTEGER   NNrecord id in the table
OperatorIdINTEGER FK NNsystem user, who uploaded (updated) the file
FileTypeINTEGER FK NNfile type (e.g. csv table, fasta sequence, image, video, etc)
OrigFileNameVARCHAR(254)   NNname of the original file
HashFileNameVARCHAR(64)   NNhash of the orignial file name
UploadTimeDATETIME   NNtime of upload, update of the file
FileExtensionVARCHAR(10)    file extension
MultimediaNoteTEXT    extended description of the multimedia
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`MultimediaId`
xmme_SystemTableINDEX`SystemTable`
xmme_RecordIdINDEX`RecordId`
xmme_OperatorIdINDEX`OperatorId`
xmme_FileTypeINDEX`FileType`


Table: conversionruleThis table defines conversion rules between units stored in the generalunit table. There can be only one rule per unique pair of from and to unit. Conversion formula should be a string, which evals to JavaScript code. JavaScript has engines and parsers on all platforms and in most modern languages, so it is the safest option to use this notation as close to be generic.

ColNameDatatypePKFKAINNDefaultValueComments
ConversionRuleIdINTEGERPK AINNrule id
FromUnitIdINTEGER FK NNid of the from unit
ToUnitIdINTEGER FK NNid of the to unit
ConversionFormulaVARCHAR(7000)   NNx * 1formula, where x is the value of the from unit and result of the evaluation in a value in to unit. Formula should eval to JavaScript code.
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`ConversionRuleId`
xcr_FromUnitIdINDEX`FromUnitId`
xcr_ToUnitIdINDEX`ToUnitId`
xcr_UniqueUnitsUNIQUE`FromUnitId`, `ToUnitId`


Table: keywordgroupArbitrary groups of keywords for easy search or other purpose.

ColNameDatatypePKFKAINNDefaultValueComments
KeywordGroupIdINTEGERPK AINNid of the keyword group
KeywordGroupNameVARCHAR(100)   NNunique name of the keyword group
OperatorIdINTEGER FK  optional operator id - if defined than group may belong to this particular user
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`KeywordGroupId`
kwg_KeywordGroupNameUNIQUE`KeywordGroupName`, `OperatorId`
kwg_OperatorIdINDEX`OperatorId`


Table: keywordSystem wide collection of keywords

ColNameDatatypePKFKAINNDefaultValueComments
KeywordIdINTEGERPK AINNkeyword id
KeywordNameVARCHAR(30)   NNunique keyword
KeywordNoteVARCHAR(254)    keyword description
OperatorIdINTEGER FK  optional owner of the keyword
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`KeywordId`
kw_KeywordNameOperatorUNIQUE`KeywordName`, `OperatorId`
kw_OperatorIdINDEX`OperatorId`


Table: keywordgroupentrylist of keywords in the keyword group(s)

ColNameDatatypePKFKAINNDefaultValueComments
KeywordGroupEntryIdINTEGERPK AINNkeyword group entry id
KeywordIdINTEGER FK NNkeyword id in the group
KeywordGroupIdINTEGER FK NNkeyword group id
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`KeywordGroupEntryId`
kwge_KeywordIdINDEX`KeywordId`
kwge_KeywordGroupIdINDEX`KeywordGroupId`


Table: uniquenumberJust to assure that every number provided in REST interface is always truly system wide unique.

ColNameDatatypePKFKAINNDefaultValueComments
UniqueNumberIdINTEGERPK AINNsytem wide unique number
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`UniqueNumberId`


[BACK TO TOP]

Region: Trait and TreatmentTrait and Treatment related data

Table: genotypetraitTable to store known characteristics for the genotype as a whole e.g. Average Flowing Dates, known disease resistance, observational traits like colour, etc. Useful if there have not been many (or any) trials on a particular genotype and at the same time there is some publicly known data.

ColNameDatatypePKFKAINNDefaultValueComments
GenotypeTraitIdINTEGER(10)PK AINNgenotype trait id
GenotypeIdINTEGER FK NNgenotype id
TraitIdINTEGER FK NNtrait id
TraitValueVARCHAR(255)   NNknown trait value, whatever the user specifies it to be, very generic
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`GenotypeTraitId`
xgt_GenotypeIdINDEX`GenotypeId`
xgt_TraitIdINDEX`TraitId`


Table: traitDefines the measurement values for the genotype and trial. The specification of a validation rule is optional, however the format must adhere to either a regular or boolean expression. For example a validation rule could be: - Regular Expression TraitValRule=([A-Z]*) - Boolean Expression TraitValRule=(x\g1 and x\k50)

ColNameDatatypePKFKAINNDefaultValueComments
TraitIdINTEGERPK AINNtrait id
UnitIdINTEGER FK NNid of the unit trait will be measured in
TraitGroupTypeIdINTEGER FK  optional - class traitgroup - (e.g. all plant height related traits can be grouped in plantheight type
TraitNameVARCHAR(32)   NNtrait name
TraitCaptionVARCHAR(64)   NNtrait name (e.g. to display) shorter version or e.g. name without spaces
AltIdentifierVARCHAR(254)    alternative identifier e.g. code used in another system like trait ontology or other
TraitDescriptionVARCHAR(255)   NNdescription about trait
TraitDataTypeINTEGER FK NNdata type as per general type Class traitdatatype (e.g. DATE, TEXT, CATEGORICAL, ELAPSED_DAYS, INTEGER, DECIMAL) possibly others
TraitValueMaxLengthINTEGER(10)   NNmax length of the value (e.g. 12)
TraitLevelSET('trialunit','subtrialunit','notetrialunit')   NNtrialunitlevel at which trait is being used (scored), additional global distinction
IsTraitUsedForAnalysisTINYINT(1)   NNflag - can be used to streamline export, e.g export all that need analysis
TraitValRuleVARCHAR(255)   NNvalidation rule for the value of the trait
TraitValRuleErrMsgVARCHAR(255)   NNerror message to display, when validation rule criteria are not met
OwnGroupIdINTEGER   NNgroup id owning the record
AccessGroupIdINTEGER   NN0group id with some access to the record
OwnGroupPermTINYINT   NNowning group permissions
AccessGroupPermTINYINT   NN0other group permissions
OtherPermTINYINT   NN0all system users permissions
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TraitId`
xt_TraitNameUNIQUE`TraitName`
xt_TraitCaptionINDEX`TraitCaption`
xt_TraitGroupTypeIdINDEX`TraitGroupTypeId`
xt_OwnGroupIdINDEX`OwnGroupId`
xt_AccessGroupIdINDEX`AccessGroupId`
xt_OwnGroupPermINDEX`OwnGroupPerm`
xt_AccessGroupPermINDEX`AccessGroupPerm`
xt_OtherPermINDEX`OtherPerm`
xt_TraitDataTypeINDEX`TraitDataType`
xt_TraitLevelINDEX`TraitLevel`
xt_AltIdentifierUNIQUE`AltIdentifier`


Table: traitaliasList of alias names for traits. Sometime for e.g. multinational organisations the same trait can be translated into several languages. The TraitLang column provides standard language code for translation interfaces.

ColNameDatatypePKFKAINNDefaultValueComments
TraitAliasIdINTEGERPK AINNtrait alias id
TraitIdINTEGER FK NNtrait id
TraitAliasNameVARCHAR(64)   NNname of trait alias
TraitAliasCaptionVARCHAR(64)    caption of the trait alias
TraitAliasDescriptionVARCHAR(254)    description of the trait alias
TraitAliasValueRuleErrMsgVARCHAR(254)    value rule error message of the trait alias
TraitLangVARCHAR(6)    language code (e.g. en for English, sp for Spanish etc) in case trait alias is just a trait translation
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TraitAliasId`
xta_TraitAliasNameINDEX`TraitAliasName`
xta_TraitIdINDEX`TraitId`
xta_TraitLangINDEX`TraitLang`


Table: treatmentDescription (or value) for a treatment for trial unit (plot). Useful if trying to measure response to certain level of irrigations, fertilisation, etc.

ColNameDatatypePKFKAINNDefaultValueComments
TreatmentIdINTEGERPK AINNtreatment id
TreatmentTextVARCHAR(255)   NNtreatment description
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TreatmentId`
xt_TreatmentTextUNIQUE`TreatmentText`


Table: treatmentfactorAdditional virtual columns for treatment - where more detailed definitions are necessary.

ColNameDatatypePKFKAINNDefaultValueComments
TreatmentIdINTEGERPKFK NNtreatment id
FactorIdINTEGERPKFK NNfactor id
FactorValueVARCHAR(32)   NNvalue
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TreatmentId`, `FactorId`
FactorIdINDEX`FactorId`


Table: trialunittreatmentList of treatments for a trial unit.

ColNameDatatypePKFKAINNDefaultValueComments
TrialUnitTreatmentIdINTEGERPK AINNinternal id
TreatmentIdINTEGER FK NNtreatment id - which treatment was used inside the unit
TrialUnitIdINTEGER FK NNtrial unit id - which trial unit is affected by a treatment
TreatmentDateTimeDATETIME    date time of the treatment
TrialUnitTreatmentNoteTEXT    note for treatment inside this trial unit
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TrialUnitTreatmentId`
xttr_TreatmentIdINDEX`TreatmentId`
xttr_TrialUnitIdINDEX`TrialUnitId`


[BACK TO TOP]

Region: Trait groupingsArbitrary groups of traits

Table: traitgroupGroup of traits. Can be used for various arbitrary purposes.

ColNameDatatypePKFKAINNDefaultValueComments
TraitGroupIdINTEGERPK AINNtrait group id
TraitGroupNameVARCHAR(254)   NNname of the group
AltIdentifierVARCHAR(254)    alternative identified e.g. code used in another system like trait ontology
OperatorIdINTEGER FK  optional operator id - if defined than group may belong to this particular user
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TraitGroupId`
trg_TraitGroupNameUNIQUE`TraitGroupName`, `OperatorId`
trg_OperatorIdINDEX`OperatorId`
trg_AltIdentifierUNIQUE`AltIdentifier`


Table: traitgroupentryList of trait group members

ColNameDatatypePKFKAINNDefaultValueComments
TraitGroupEntryIdINTEGERPK AINNtrait group entry internal id
TraitIdINTEGER FK NNtrait id belonging to the group
TraitGroupIdINTEGER FK NNtrait group id
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TraitGroupEntryId`
tge_TraitIdINDEX`TraitId`
tge_TraitGroupIdINDEX`TraitGroupId`


[BACK TO TOP]

Region: Trial events and workflowVarious operations and events happening on the entire trial. Design of the workflow.

Table: trialeventTrial events are additional descriptors for operations (events) affecting an entire trial. Example events: - spray nitrogen 10 tons, - rain shed over trial during flowering season, - catastrophic rainfall or thunder, etc.

ColNameDatatypePKFKAINNDefaultValueComments
TrialEventIdINTEGERPK AINNtrial event id
UnitIdINTEGER FK NN
EventTypeIdINTEGER FK NNtrial event type id
TrialIdINTEGER FK NNtrial id
OperatorIdINTEGER FK NNperson who performed operation
TrialEventValueVARCHAR(32)   NNevent value (number in the units defined)
TrialEventDateDATETIME   NNoperation date
TrialEventNoteVARCHAR(254)    additional description of the event
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TrialEventId`
xte_OperatorIdINDEX`OperatorId`
xte_TrialIdINDEX`TrialId`
xte_EventTypeIdINDEX`EventTypeId`
xte_TrialEventDateINDEX`TrialEventDate`


Table: trialeventfactorAdditional virtual columns descriptors for trial events. Some events (treatments) done to the trial. Can be a record of history, what was happening on the trial.

ColNameDatatypePKFKAINNDefaultValueComments
FactorIdINTEGERPKFK NNfactor id
TrialEventIdINTEGERPKFK NNtrial event id
FactorValueVARCHAR(255)   NNvalue
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`FactorId`, `TrialEventId`
FactorIdINDEX`FactorId`


Table: trialworkflowSome trials follow specific workflows and even if not everything is reflected in the database, certain steps are required to be done and recorded. This table could be such a record of each step or current status of the trial.

ColNameDatatypePKFKAINNDefaultValueComments
TrialWorkflowIdINTEGERPK AINNinternal id of trial workflow step
WorkflowdefIdINTEGER FK NNid of workflow step
TrialIdINTEGER FK NNid of the trial the workflow is attached to
CompleteByDATETIME    optional deadline to complete step
CompletedTINYINT   NN0flag if completed - default 0
ReminderAtDATETIME    optional date and time of reminder
ReminderToVARCHAR(254)    optional e-mail list where to send reminders to
NoteTEXT    notes about this step
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TrialWorkflowId`
twf_workflowdefINDEX`WorkflowdefId`
twf_trialINDEX`TrialId`


[BACK TO TOP]

Region: Trial groupingsGroupings of the trials for multilocation (multienvironmental) and possibly other purposes.

Table: trialgroupMulti location trial grouping. Arbitrary grouping of trials, can be used e.g. for multienvironmental trials or group of trials in multi year experiment, which may or may not share the design.

ColNameDatatypePKFKAINNDefaultValueComments
TrialGroupIdINTEGERPK AINNInternal trial group id
TrialGroupOwnerINTEGER FK NNsystem user id who ownes the trial group
TrialGroupTypeINTEGER FK NNtrial group type from general type class trialgroup
TrialGroupNameVARCHAR(254)   NNtrial group unique name
TrialGroupStartDATE    trial group or experiment start date
TrialGroupEndDATE    trial group or experiment end date
TrialGroupNoteTEXT    Long description of trial group
TrialGroupLayoutTEXT    layout of the trials in the group, e.g. relative positions to each other
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TrialGroupId`
xtg_NameUNIQUE`TrialGroupName`
xtg_startINDEX`TrialGroupStart`
xtg_endINDEX`TrialGroupEnd`
xtg_ownerINDEX`TrialGroupOwner`
xtg_typeINDEX`TrialGroupType`


Table: trialgroupentryMany to many link between trials and trial group

ColNameDatatypePKFKAINNDefaultValueComments
TrialGroupEntryIdINTEGERPK AINNinternal trial group entry id
TrialGroupIdINTEGER FK NNtrial group id
TrialIdINTEGER FK NNtrial id - member of the trial group
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TrialGroupEntryId`
xtge_trialidINDEX`TrialId`
xtge_trialgroupidINDEX`TrialGroupId`


Table: trialgroupfactorFactor columns for trial groups

ColNameDatatypePKFKAINNDefaultValueComments
FactorIdINTEGERPKFK NNfactor id
TrialGroupIdINTEGERPKFK NNtrial group id
FactorValueVARCHAR(254)   NNvalue
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`FactorId`, `TrialGroupId`
FactorIdINDEX`FactorId`


[BACK TO TOP]

Region: Trials and UnitsTrial and Trial Units related data

Table: designtypeEach trial (experiment) has a design (layout/method) describing how the genotypes have been planted, the number of replicates, etc. Design type identifies the type of a trial design. For example: - Randomised Block using DiGGer - The trial design of this design type is generated by the DiGGer. - Unknown Design Type.

ColNameDatatypePKFKAINNDefaultValueComments
DesignTypeIdINTEGERPK AINNdesign type id
DesignTypeNameVARCHAR(32)   NNdesign type name
DesignSoftwareVARCHAR(255)    The executable file of the Software (such as DiGGer) that is used to design the trial of this design type.
DesignTemplateFileTEXT    The template file defines how the parameter are required to be inserted in the input file for the design software.
DesignGenotypeFormatVARCHAR(32)    Format in which the Specimen Name and Specimen Id will be exported into the trial design input file.
DesignFactorAliasPrefixVARCHAR(16)    Prefix that will be used to find the factor for the Trial Design Parameter while importing trial design from the output file generated by the trial design software (such as DiGGer).
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`DesignTypeId`
xdt_DesignTypeNameUNIQUE`DesignTypeName`


Table: trialThis table contains list of trials (equivalent to field experiments) performed within sites.

ColNameDatatypePKFKAINNDefaultValueComments
TrialIdINTEGERPK AINNtrial id
SeasonIdINTEGER FK NNid of the season type from general type - to identify global concept of seasons
ProjectIdINTEGER FK  id of the project that trial belongs to, it is optional
CurrentWorkflowIdINTEGER FK  current workflow id to identify which workflow is currently assigned to trial. Optional as trial may not have a workflow assigned at all.
TrialTypeIdINTEGER FK NNtrial type id (general type, different from design type, which is trial specific definition)
SiteIdINTEGER FK NNsite id, to which trial belongs to
TrialNameVARCHAR(100)   NNTrial name (can be created as concatenation of site, type, date, number)
TrialNumberINTEGER   NNtrial running number
TrialAcronymVARCHAR(30)   NNalternative short name for a trial
DesignTypeIdINTEGER FK NNdesign type - relation to design type table
TrialManagerIdINTEGER FK NNperson managing trial
TrialStartDateDATETIME   NNwhen started
TrialEndDateDATETIME    when finished
TrialNoteVARCHAR(6000)    description text
TrialLayoutTEXT    object describing trial units layout - e.g. walking path, relative location of raw1, col1, etc
TULastUpdateTimeStampDATETIME   NNdate and time of trial unit last update - used for bulk update of trial units
OwnGroupIdINTEGER   NNid of the group which owns the record
AccessGroupIdINTEGER   NN0id of the group which have permissions to the record (different to the own group)
OwnGroupPermTINYINT   NNpermissions of the own group to the record
AccessGroupPermTINYINT   NN0permissions of the other group to the record
OtherPermTINYINT   NN0permissions for all registered users to the record
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TrialId`
xtr_TrialNameINDEX`TrialName`
xtr_TrialAcronymINDEX`TrialAcronym`
xtr_ContactIdINDEX`TrialManagerId`
xtr_DesignTypeIdINDEX`DesignTypeId`
xtr_SiteIdINDEX`SiteId`
xtr_TrialTypeIdINDEX`TrialTypeId`
xtr_TrialStartDateINDEX`TrialStartDate`
xtr_TrialEndDateINDEX`TrialEndDate`
xtr_CurrentWorkflowIdINDEX`CurrentWorkflowId`
xtr_ProjectIdINDEX`ProjectId`
xtr_OwnGroupIdINDEX`OwnGroupId`
xtr_AccessGroupIdINDEX`AccessGroupId`
xtr_OwnGroupPermINDEX`OwnGroupPerm`
xtr_AccessGroupPermINDEX`AccessGroupPerm`
xtr_OtherPermINDEX`OtherPerm`
xtr_SeasonIdINDEX`SeasonId`


Table: trialfactorAdditional virtual columns for trial.

ColNameDatatypePKFKAINNDefaultValueComments
TrialIdINTEGERPKFK NNtrial id
FactorIdINTEGERPKFK NNfactor id
FactorValueVARCHAR(255)   NNvalue
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TrialId`, `FactorId`
FactorIdINDEX`FactorId`


Table: trialunitThis table stores information about each unit of the trial. It assumes that the unit is homogeneous. One trial unit can contain more than one specimen (e.g. for hybrid plants or when one plant died and another was replanted in place). Trial unit is a measured unit, which can be further divided by sample types distinguished within.

ColNameDatatypePKFKAINNDefaultValueComments
TrialUnitIdINTEGERPK AINNTrial Unit Id
TrialIdINTEGER FK NNtrial id
SourceTrialUnitIdINTEGER FK  0Source Trial Unit that identifies the source of the sample used in the Trial Unit of the Trial. For example, the source trial unit for a wheat grain sample used in a milling trial can be a trial unit of a Wheat Variety Evaluation Trial. While importing data, the source file must provide information of one of the Alternate Key of Trial and the Unit Position of the source trial to identify the source trial unit.
ReplicateNumberINTEGER(10)   NNreplicate number - next instance of the same specimen
TrialUnitBarcodeVARCHAR(254)    barcode of the trial unit (plot)
TrialUnitPositionVARCHAR(254)    string describing the unit position e.g. can be concatenated list of dimensions
TrialUnitEntryIdINTEGER    the same as unit position, but just a numeric value - useful if wanting to order units in numeric fashion
TrialUnitXINTEGER    X dimension of the trial unit (can be e.g. row)
TrialUnitYINTEGER    Y dimension of the trial unit (can be e.g. column)
TrialUnitZINTEGER    Z dimension of the trial unit (can be e.g. block)
TrialUnitNoteVARCHAR(254)    additional description for the trial unit
SampleSupplierIdINTEGER(10)    sample supplier id (contact or organisation, no defined relation here). Optional field to define who supplied the the seed. Choosing if this is contact or organisation is a matter for organisations convention.
TrialUnitTypeIdINTEGER FK  type of trial unit
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TrialUnitId`
xtu_TrialUnitPositionINDEX`TrialUnitPosition`
xtu_SampleSupplierIdINDEX`SampleSupplierId`
xtu_TrialUnitBarcodeUNIQUE`TrialUnitBarcode`
xtu_TrialIdINDEX`TrialId`
xtu_TrialUnitEntryIdINDEX`TrialUnitEntryId`
xtu_TrialUnitXINDEX`TrialUnitX`
xtu_TrialUnitYINDEX`TrialUnitY`
xtu_TrialUnitZINDEX`TrialUnitZ`
xtu_SourceTrialUnitIdINDEX`SourceTrialUnitId`


Table: trialunitspecimenMaintains the many to many relationship between trialunit and specimens. If specimen is the representation of the whole genotype (or composition of genotypes), it will have a single record here. Allows the sampling of multiple specimens from a unit or even same specimen multiple times in the unit distinguished by specimen number. For instances of long lived trials (e.g. tree living 30 years) this enables the reassignment of the same plant into different trial units.

ColNameDatatypePKFKAINNDefaultValueComments
TrialUnitSpecimenIdINTEGERPK AINNinternal trail unit specimen id
TrialUnitIdINTEGER FK NNtrial unit id
SpecimenIdINTEGER FK NNid of the planted specimen
ItemIdINTEGER FK  source item (e.g. seed bag) for this particular trial unit - having it here allows to use different seed bags for each planted specimen if this is a case, link is optional as the seed source may come from other places
PlantDateDATE    date when specimen has been planted in the trial unit
HarvestDateDATE    date when specimen has been harvested from the trial unit
HasDiedTINYINT    0flag if specimen died
NotesVARCHAR(254)    additional notes
SpecimenNumberINTEGER   NN0distinguish between instances of the same specimen in the same trial unit - just number them
TUSLabelVARCHAR(254)    label for trial unit specimen - anything to make label on individual
TUSBarcodeVARCHAR(254)    barcode for trial unit specimen - if exists must be unique - labelling individual specimen in trial unit
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TrialUnitSpecimenId`
xtus_SpecimenIdINDEX`SpecimenId`
xtus_PlantDateINDEX`PlantDate`
xtus_HarvestDateINDEX`HarvestDate`
xtus_ItemIdINDEX`ItemId`
xtus_USNUNIQUE`SpecimenId`, `SpecimenNumber`, `TrialUnitId`
xtus_TUSBarcodeUNIQUE`TUSBarcode`
xtus_TrialUnitIdINDEX`TrialUnitId`


Table: trialtraitPart of the trial definition. List of traits expected to be measured for a trial. This table should be rather treated as a control checkpoint, while inserting real measurements into samplemeasurement table.

ColNameDatatypePKFKAINNDefaultValueComments
TrialTraitIdINTEGERPK AINNrecord id
UnitIdINTEGER FK  Alternative unit used in trait measurement, optional, if not provided use unit attached to trait directly
TrialIdINTEGER FK NNtrial id
TraitIdINTEGER FK NNtrait id
CompulsoryTINYINT(1)   NN00|1 flag indicating that this combination is compulsory to measure in the trial
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TrialTraitId`
xtt_TraitIdINDEX`TraitId`
xtt_TrialIdINDEX`TrialId`


Table: trialdimensionOptional definition of the trial dimensionality. If user wants to define that X dimension is called e.g. row and Y dimension is called column - this is a place to do it. In the future this can be extended to contain trial level information about e.g. plot width, plot height, plot spaces, etc. Trial and dimention combination has to be unique - forced by unique index.

ColNameDatatypePKFKAINNDefaultValueComments
TrialDimensionIdINTEGERPK AINNDimension id
TrialIdINTEGER FK NNtrial id to which dimension refers to
DimensionSET('X','Y','Z','EntryId','Position')   NNwhich trial dimension it is
DimensionNameVARCHAR(100)   NNname of the dimension e.g Y can be column or range or something else, EntryId can be PlotId or PlotNumber or else
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TrialDimensionId`
xtd_TrialIdINDEX`TrialId`
xtd_DimensionUNIQUE`TrialId`, `Dimension`
xtd_DimensionNameUNIQUE`TrialId`, `DimensionName`


Table: trialunitkeywordkeywords for a trial unit

ColNameDatatypePKFKAINNDefaultValueComments
TrialUnitKeywordIdINTEGERPK AINNtrial unit keyword id
TrialUnitIdINTEGER FK NNtrial unit id
KeywordIdINTEGER FK NNkeyword id
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TrialUnitKeywordId`
tuk_KeywordIdINDEX`KeywordId`
tuk_TrialUnitIdINDEX`TrialUnitId`


Table: crossingA table which stores crossing information for nursery management

ColNameDatatypePKFKAINNDefaultValueComments
CrossingIdINTEGERPK AINNId for crossing record
TrialIdINTEGER FK NNtrial (nursery) for which the crossing is designed
BreedingMethodIdINTEGER FK NNtype of the cross defined by breeding method - has to be compatible with pedigree table
MaleParentIdINTEGER FK NNid of the male parent - specimen in the trial unit
FemaleParentIdINTEGER FK NNid of the female parent - specimen in the trial unit
CrossingDateTimeDATETIME    date time when crossing performed
UserIdINTEGER FK NNwho has done the cross
CrossingNoteVARCHAR(254)    some notes about the cross
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`CrossingId`
xcr_trialidINDEX`TrialId`
xcr_breedingmethodidINDEX`BreedingMethodId`
xcr_useridINDEX`UserId`
xcr_maleparentidINDEX`MaleParentId`
xcr_femaleparentidINDEX`FemaleParentId`


Table: trialunitfactorAdditional virtual columns for trial units.

ColNameDatatypePKFKAINNDefaultValueComments
TrialUnitIdINTEGERPKFK NNtrial unit id
FactorIdINTEGERPKFK NNfactor id
FactorValueVARCHAR(255)   NNvalue
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`TrialUnitId`, `FactorId`
FactorIdINDEX`FactorId`


[BACK TO TOP]

Region: Virtual column definitions

Table: factorMain database table containing the definitions of all virtual columns. A uniform mechanism across the database where all tables with the suffix factor relate to this table.

ColNameDatatypePKFKAINNDefaultValueComments
FactorIdINTEGERPK AINNfactor id
FactorNameVARCHAR(32)   NNcolumn name
FactorCaptionVARCHAR(64)    caption (shorter version of name)
FactorDescriptionVARCHAR(255)    what is stored in the column
TableNameOfFactorVARCHAR(32)   NNwhich main table this factor refers to
FactorDataTypeVARCHAR(8)   NNdata type (e.g. VARCHAR)
CanFactorHaveNullTINYINT(1)   NNcan value be null (0|1)
FactorValueMaxLengthINTEGER(10)   NNmaximum size of value (e.g. 256) refers to the maximum length of FactorValue is VARCHAR in the factor data table like contactfactor
FactorUnitVARCHAR(16)    value unit (e.g. kg, meters, etc)
OwnGroupIdINTEGER   NNthe group that owns this virtual column definition
PublicTINYINT   NN0if public=1, it means other group administrators can edit and delete this definition
FactorValidRuleVARCHAR(100)    factor value validation rule (optional)
FactorValidRuleErrMsgVARCHAR(254)    error message if value does not conform to validation rule
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`FactorId`
xf_FactorNameINDEX`FactorName`
xf_FactorCaptionINDEX`FactorCaption`
xf_TableNameOfFactorINDEX`TableNameOfFactor`


Table: factoraliasAliases for factors

ColNameDatatypePKFKAINNDefaultValueComments
FactorAliasIdINTEGERPK AINNfactoralias id
FactorAliasNameVARCHAR(64)   NNalternative name of the factor
FactorIdINTEGER FK NNfactor id
IndexNameIndexTypeColumns
PRIMARYPRIMARY KEY`FactorAliasId`
xfa_FactorAliasNameINDEX`FactorAliasName`
xfa_FactorIdINDEX`FactorId`


[BACK TO TOP]

RELATIONSlist of model relations

RelNameRelTypeFromTableToTableCreateRefDef
Cont+ContFact1..ncontact contactfactor1
Cont+SysUser1..n (NA)contact systemuser1
DesType+Trial1..n (NA)designtype trial1
Fac+Contact1..nfactor contactfactor1
Fac+FacAlias1..n (NA)factor factoralias1
Fac+Genotype1..nfactor genotypefactor1
Fac+Site1..nfactor sitefactor1
Fac+Treat1..nfactor treatmentfactor1
Fac+Trial1..nfactor trialfactor1
Fac+TrialEvent1..nfactor trialeventfactor1
Gen+GenA1..n (NA)genotype genotypealias1
Gen+GenFac1..ngenotype genotypefactor1
Gen+GenTrait1..n (NA)genotype genotypetrait1
Genus+Gen1..n (NA)genus genotype1
Org+Cont1..n (NA)organisation contact1
Site+SiteF1..nsite sitefactor1
SysGrp+ASysGrp1..n (NA)systemgroup authorisedsystemgroup1
SysUser+ActLog1..n (NA)systemuser activitylog1
SysUser+ASysGrp1..n (NA)systemuser authorisedsystemgroup1
Trait+GenTrait1..n (NA)trait genotypetrait1
Trait+TraitA1..n (NA)trait traitalias1
Treat+TreatF1..ntreatment treatmentfactor1
Trial+TrailF1..ntrial trialfactor1
Trial+TrialEvent1..n (NA)trial trialevent1
Trial+TrialUnit1..n (NA)trial trialunit1
TrialEvent+TrialEventF1..ntrialevent trialeventfactor1
TUnit+SM1..ntrialunit samplemeasurement1
Trait+SM1..n (NA)trait samplemeasurement1
Site+Trial1..n (NA)site trial1
Spec+GenSpec1..n (NA)specimen genotypespecimen1
Gen+GenSpec1..n (NA)genotype genotypespecimen1
TUnit+TUnitSpec1..n (NA)trialunit trialunitspecimen1
Spec+TUnitSpec1..n (NA)specimen trialunitspecimen1
SysUser+SM1..nsystemuser samplemeasurement1
Spec+SpecF1..nspecimen specimenfactor1
Fac+Spec1..nfactor specimenfactor1
Cont+Trial1..n (NA)contact trial1
Cont+Site1..n (NA)contact site1
SpecGr+SpecGrEntry1..nspecimengroup specimengroupentry1
Spec+SpecGrEntry1..nspecimen specimengroupentry1
Spec+PedParent1..n (NA)specimen pedigree1
Spec+Ped1..n (NA)specimen pedigree1
BM+Spec1..n (NA)breedingmethod specimen1
Fac+BM1..n (NA)factor breedingmethodfactor1
BM+BMF1..n (NA)breedingmethod breedingmethodfactor1
Item+ItemF1..n (NA)item itemfactor1
Fac+Item1..n (NA)factor itemfactor1
Item+ItemGrEntry1..n (NA)item itemgroupentry1
ItemGr+ItemGrEntry1..n (NA)itemgroup itemgroupentry1
Spec+Item1..n (NA)specimen item1
ItemUnit+Item1..n (NA)generalunit item1
Stor+Item1..n (NA)storage item1
DevReg+DevRegF1..n (NA)deviceregister deviceregisterfactor1
Fac+DevReg1..n (NA)factor deviceregisterfactor1
DevReg+Item1..n (NA)deviceregister item1
SysUser+Item1..n (NA)systemuser item1
Stor+StorPar1..n (NA)storage storage1
Trait+TrialTrait1..n (NA)trait trialtrait1
Trial+TrialTrait1..n (NA)trial trialtrait1
ContainerType+Item1..n (NA)generaltype item1
Type+DevReg1..n (NA)generaltype deviceregister1
Type+Item1..n (NA)generaltype item1
Type+Site1..n (NA)generaltype site1
Type+Trial1..n (NA)generaltype trial1
Type+SM1..n (NA)generaltype samplemeasurement1
Type+TrialEvent1..n (NA)generaltype trialevent1
Fac+GenType1..n (NA)factor generaltypefactor1
GenType+GenTypeF1..n (NA)generaltype generaltypefactor1
SysUser+TrialEvent1..n (NA)systemuser trialevent1
Type+SpecGr1..n (NA)generaltype specimengroup1
Cont+Item1..n (NA)contact item1
StateType+Item1..n (NA)generaltype item1
Item+ItemPar1..n (NA)item itemparent1
Item+ItemParPar1..n (NA)item itemparent1
Type+Ped1..n (NA)generaltype pedigree1
Type+ItemParent1..n (NA)generaltype itemparent1
TUnit+SrcTUnit1..n (NA)trialunit trialunit1
Type+GenSpec1..n (NA)generaltype genotypespecimen1
TUnitSpec+Item1..n (NA)trialunitspecimen item1
Wflow+WflowDef1..n (NA)workflow workflowdef1
Type+Wflow1..n (NA)generaltype workflow1
Trial+TrialWflow1..n (NA)trial trialworkflow1
WflowDef+TWflow1..n (NA)workflowdef trialworkflow1
Wflow+Trial1..n (NA)workflow trial1
Project+Trial1..n (NA)project trial1
Type+Project1..n (NA)generaltype project1
Project+ProjectF1..nproject projectfactor1
Fac+Project1..nfactor projectfactor1
Cont+Project1..n (NA)contact project1
GenA+GenAFac1..n (NA)genotypealias genotypealiasfactor1
Fac+GenAF1..n (NA)factor genotypealiasfactor1
Type+Mmedia1..n (NA)generaltype multimedia1
SysUser+Multimedia1..n (NA)systemuser multimedia1
Item+ItemLog1..n (NA)item itemlog1
SysUser+ItemLog1..n (NA)systemuser itemlog1
Type+ItemLog1..n (NA)generaltype itemlog1
Item+TUnitSpec1..n (NA)item trialunitspecimen1
Org+OrgF1..n (NA)organisation organisationfactor1
Fac+Org1..n (NA)factor organisationfactor1
Type+GenA1..n (NA)generaltype genotypealias1
Gen+GenPedPar1..n (NA)genotype genpedigree1
Gen+GenPed1..n (NA)genotype genpedigree1
Type+GenPed1..n (NA)generaltype genpedigree1
TypeStat+GenA1..n (NA)generaltype genotypealias1
Unit+Trait1..n (NA)generalunit trait1
Unit+TrialEvent1..n (NA)generalunit trialevent1
Type+Trait1..n (NA)generaltype trait1
Type+Unit1..n (NA)generaltype generalunit1
MLT+MLTF1..n (NA)trialgroup trialgroupfactor1
Fac+TrialGrp1..n (NA)factor trialgroupfactor1
TrialGrp+TrialGrpEntry1..n (NA)trialgroup trialgroupentry1
Trial+MLT1..n (NA)trial trialgroupentry1
Type+TrialGrp1..n (NA)generaltype trialgroup1
SysUser+TrialGrp1..n (NA)systemuser trialgroup1
Type+SpecGrStat1..n (NA)generaltype specimengroup1
Type+BrMeth1..n (NA)generaltype breedingmethod1
Unit+TrialTrait1..n (NA)generalunit trialtrait1
Unit+FromUnit1..n (NA)generalunit conversionrule1
Unit+ToUnit1..n (NA)generalunit conversionrule1
Trial+TrialDim1..n (NA)trial trialdimension1
TUnitSpec+SM1..n (NA)trialunitspecimen samplemeasurement0
KeyG+Entry1..n (NA)keywordgroup keywordgroupentry1
Key+Entry1..n (NA)keyword keywordgroupentry1
Rel_1251..n (NA)trialunit trialunitkeyword1
TUnit+Key1..n (NA)keyword trialunitkeyword1
Rel_1271..n (NA)specimen specimenkeyword1
Spec+Key1..n (NA)keyword specimenkeyword1
Trial+Cross1..n (NA)trial crossing1
Cross+BrMeth1..n (NA)breedingmethod crossing1
Cross+MaleParent1..n (NA)trialunitspecimen crossing1
Cross+FemaleParent1..n (NA)trialunitspecimen crossing1
SysUser+Cross1..n (NA)systemuser crossing1
KeyGrp+User1..n (NA)systemuser keywordgroup1
TrGrp+TrGrpEnt1..n (NA)traitgroup traitgroupentry1
Trait+TrGrEnt1..n (NA)trait traitgroupentry1
TrGr+User1..n (NA)systemuser traitgroup1
SMG+SM1..n (NA)smgroup samplemeasurement0
Type+TraitData1..n (NA)generaltype trait1
Key+User1..n (NA)systemuser keyword1
Trial+SMG1..n (NA)trial smgroup1
User+SMG1..n (NA)systemuser smgroup1
Season+Trial1..n (NA)generaltype trial1
Genus+GAlias1..n (NA)genus genotypealias1
TUnit+Treatment1..n (NA)treatment trialunittreatment1
CMG+CM1..n (NA)cmgroup crossingmeasurement1
Trial+CMG1..n (NA)trial cmgroup1
Trait+CMG1..n (NA)trait crossingmeasurement1
User+CMG1..n (NA)systemuser cmgroup1
User+CM1..n (NA)systemuser crossingmeasurement1
Type+CM1..n (NA)generaltype crossingmeasurement1
Crossing+CM1..n (NA)crossing crossingmeasurement1
Survey+SurveryTUnit1..n (NA)survey surveytrialunit1
Survery+SurveyTrait1..n (NA)survey surveytrait1
Trait+SurveyTrait1..n (NA)trait surveytrait1
TUnitSpec+Pedigree1..n (NA)trialunitspecimen pedigree1
TUnit+SurveyTUnit1..n (NA)trialunit surveytrialunit1
Crossing+Spec1..n (NA)crossing specimen1
Item+IM1..n (NA)item itemmeasurement1
Trait+IM1..n (NA)trait itemmeasurement1
User+IM1..n (NA)systemuser itemmeasurement1
Type+IM1..n (NA)generaltype itemmeasurement1
IMG+IM1..n (NA)imgroup itemmeasurement1
TUnit+TUnitTreatment1..n (NA)trialunit trialunittreatment1
Cont+Survey1..n (NA)contact survey1
Survey+SurveyF1..n (NA)survey surveyfactor1
Fac+Survey1..n (NA)factor surveyfactor1
User+IMG1..n (NA)systemuser imgroup1
Survey+SM1..n (NA)survey samplemeasurement1
Get+Taxon1..n (NA)taxonomy genotype1
Tax+ParTax1..n (NA)taxonomy taxonomy1
TUnit+TUnitF1..ntrialunit trialunitfactor1
Fac+TUnit1..nfactor trialunitfactor1
Type+TUnit1..n (NA)generaltype trialunit1
Type+Survey1..n (NA)generaltype survey1
Contact+SurveyTUnit1..n (NA)contact surveytrialunit1