RESO Meta-Model

U RESO Meta-Model Comments as mouse-over tips, zoom and pan.Read column and table comments by hovering the columns and tables. Zoom with CTRL+whell mouse button, pan by dragging the diagram with the right-mouse button by DbSchema.com - Wise CodersDbSchema is an universal database designer. DbSchema has a free Community Edition. Lookup Resource Complex Types 🔗 Foreign Key fk_field_model Field ref Model ( ModelKey ) 🔗 Foreign Key fk_field_model Field ref Model ( ModelKey ) fk_field_model 🔗 Foreign Key fk_type_model Field ref Model ( TypeModelKey -> ModelKey ) 🔗 Foreign Key fk_type_model Field ref Model ( TypeModelKey -> ModelKey ) fk_type_model 🔗 Foreign Key fk_field_lookup Field ref LookupName ( LookupName ) 🔗 Foreign Key fk_field_lookup Field ref LookupName ( LookupName ) fk_field_lookup 🔗 Foreign Key fk_lookup_ln Lookup ref LookupName ( LookupName ) 🔗 Foreign Key fk_lookup_ln Lookup ref LookupName ( LookupName ) fk_lookup_ln 🔗 Foreign Key fk_primary_field Model ref Field ( PrimaryKeyFieldKey -> FieldKey ) 🔗 Foreign Key fk_primary_field Model ref Field ( PrimaryKeyFieldKey -> FieldKey ) fk_primary_field 🔗 Foreign Key fk_timestamp_field Model ref Field ( ModificationTimestampFieldKey -> FieldKey ) 🔗 Foreign Key fk_timestamp_field Model ref Field ( ModificationTimestampFieldKey -> FieldKey ) fk_timestamp_field 🔗 Foreign Key fk_source_field ModelRelationship ref Field ( SourceFieldKey -> FieldKey ) 🔗 Foreign Key fk_source_field ModelRelationship ref Field ( SourceFieldKey -> FieldKey ) fk_source_field 🔗 Foreign Key fk_dest_field ModelRelationship ref Field ( DestFieldKey -> FieldKey ) 🔗 Foreign Key fk_dest_field ModelRelationship ref Field ( DestFieldKey -> FieldKey ) fk_dest_field FieldTable reso meta-model.Field ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Defines a set of fields that are within a specific model along with all details about the field. 🔑 Pk pk_Field ( FieldKey ) FieldKey⧉ FieldKey * varchar(20) ↙ Model( FieldKey ) ↙ Model( FieldKey ) ↙ ModelRelationship( FieldKey ) ↙ ModelRelationship( FieldKey ) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The primary key of the Field. VARCHAR(20)&#1F517; Referred by Model ( PrimaryKeyFieldKey -> FieldKey ) Referred by Model ( ModificationTimestampFieldKey -> FieldKey ) Referred by ModelRelationship ( SourceFieldKey -> FieldKey ) Referred by ModelRelationship ( DestFieldKey -> FieldKey ) 🔍 Unq uk_Field ( ModelKey, FieldName ) ModelKey⧉ ModelKey * varchar(20) ↗ Field( ModelKey ) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The Foreign Key to the Model that this Field belongs to. VARCHAR(20)&#1F517; References Model ( ModelKey ) 🔍 Unq uk_Field ( ModelKey, FieldName ) FieldName⧉ FieldName * varchar(64) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The name of this field which is unique within the Model. VARCHAR(64) LookupName⧉ LookupName varchar(64) ↗ Field( LookupName ) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The name of the lookup that defines what data may go into this field. VARCHAR(64)&#1F517; References LookupName ( LookupName ) DisplayNames⧉ DisplayNames collection(i18nstring) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Contains the Collection of I18nString elements as a data structure as represented through the FieldDisplayNames object. Collection(I18nString) Definitions⧉ Definitions collection(i18nstring) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ A human readable description of what kind of data is represented by the Field. Collection(I18nString) Type⧉ Type varchar(20) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The OData Data Type of this field. This field is optional, but if this field is null, then the TypeModelKey must be filled in. VARCHAR(20) TypeModelKey⧉ TypeModelKey varchar(20) ↗ Field( ModelKey ) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ If this field is an Entity or ComplexType, this field indicates the Model that represents this DataType. VARCHAR(20)&#1F517; References Model ( TypeModelKey -> ModelKey ) CollectionYN⧉ CollectionYN * boolean ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ TRUE - This field is a container of a Collection defined by TypeModelKey. BOOLEAN NullableYN⧉ NullableYN * boolean ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ This field may be null. BOOLEAN Length⧉ Length int ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The maximum length of the data that is contained within this field when the Type is Edm.String. INT Precision⧉ Precision int ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ When the Type is Edm.Double or Edm.Decimal, represents the precision of the data contained within this field. INT Scale⧉ Scale int ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ When the Type is Edm.Double or Edm.Decimal, represents the scale of the data contained within this field. INT OrderableYN⧉ OrderableYN * boolean ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ TRUE - This may not be in the order specified during a query. FALSE - This field may not be in the order specified during a query. BOOLEAN UpdatableYN⧉ UpdatableYN * boolean ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ TRUE - This field is allowed to be updated by a client. FALSE - This field may not be updated by a client. BOOLEAN SearchableYN⧉ SearchableYN * boolean ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ TRUE - This field may be used in a filter during a query. FALSE - This field may not be used in a filter during a query. BOOLEAN ModificationTimestamp⧉ ModificationTimestamp timestamp ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The timestamp when this Field record was last updated. TIMESTAMP I18nStringTable reso meta-model.I18nString ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ A ComplexType defining a Name and Value for a Localized display name. Modeled as a table, but is simply a ComplexType. The I18nStringKey is not expected to be in the output. 🔑 Pk pk_I18nString ( Locale, Value ) Locale⧉ Locale * varchar(20) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The I18n Name of the Locale that this I18nString is for. VARCHAR(20) 🔑 Pk pk_I18nString ( Locale, Value ) Value⧉ Value * varchar(256) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The string value to display to the end-user for the locale identified by Name. VARCHAR(256) LookupTable reso meta-model.Lookup 🔑 Pk pk_Lookup ( LookupKey ) LookupKey⧉ LookupKey * varchar(20) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The primary key of this Lookup. VARCHAR(20) 🔍 Unq uk_Lookup ( LookupName, LookupValue ) LookupName⧉ LookupName * varchar(64) ↗ Lookup( LookupName ) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The name of the group of enumerations comprising the given lookup, aka picklist. It is called a "LookupName" in this proposal because more than one field can have a given lookup, so it refers to the name of the lookup rather than a given field. For example, Listing with CountyOrParish and Office with OfficeCountyOrParish having the same CountyOrParish LookupName. This MUST match the Data Dictionary definition for in cases where the lookup is defined. Vendors MAY add their own enumerations otherwise. The LookupName a given field uses is required to be annotated at the field level in the OData XML Metadata, as outlined later in this proposal. VARCHAR(64)&#1F517; References LookupName ( LookupName ) 🔍 Unq uk_Lookup ( LookupName, LookupValue ) LookupValue⧉ LookupValue * varchar(256) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The human-friendly display name the data consumer receives in the payload and uses in queries. This MAY be a local name or synonym for a given RESO Data Dictionary lookup item. VARCHAR(256) StandardLookupValue⧉ StandardLookupValue varchar(256) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The Data Dictionary StandardLookupValue of the enumerated value. This field is required when the LookupValue for a given item corresponds to a RESO standard value, meaning a standard lookup display name, known synonym, local name, or translation of that value. Local lookups MAY omit this value if they don't correspond to an existing RESO standard lookup value. VARCHAR(256) LegacyODataValue⧉ LegacyODataValue varchar(256) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The Legacy OData lookup value that the server vendor provided in their OData XML Metadata. This value is optional, and has been included in order to provide a stable mechanism for translating OData lookup values to RESO standard lookup display names, as well as for historical data that might have included the OData value at some point, even after the vendor had converted to human friendly display names. VARCHAR(256) DisplayNames⧉ DisplayNames collection(i18nstring) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Contains the Collection of I18nString elements as a data structure as represented through the LookkupDisplayNames object. Collection(I18nString) ModificationTimestamp⧉ ModificationTimestamp * timestamp ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The timestamp when this Lookup record was last updated. TIMESTAMP LookupNameTable reso meta-model.LookupName 🔑 Pk pk_LookupName ( LookupName ) LookupName⧉ LookupName * varchar(64) ↙ Field( LookupName ) ↙ Lookup( LookupName ) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The unique name of the defined lookup. The name of the group of enumerations comprising the given lookup, aka picklist. It is called a "LookupName" in this proposal because more than one field can have a given lookup, so it refers to the name of the lookup rather than a given field. For example, Listing with CountyOrParish and Office with OfficeCountyOrParish having the same CountyOrParish LookupName. This MUST match the Data Dictionary definition for in cases where the lookup is defined. Vendors MAY add their own enumerations otherwise. The LookupName a given field uses is required to be annotated at the field level in the OData XML Metadata, as outlined later in this proposal. VARCHAR(64)&#1F517; Referred by Field ( LookupName ) Referred by Lookup ( LookupName ) ModelTable reso meta-model.Model ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Every Resource that is available in a RESO server must have a record in this resource so that client applications can identify what resources are available to them. The server may restrict the visibility of rows in this resource to just those that a client has access to. 🔑 Pk pk_Model ( ModelKey ) ModelKey⧉ ModelKey * varchar(20) ↙ Field( ModelKey ) ↙ Field( ModelKey ) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The primary key of this Model. VARCHAR(20)&#1F517; Referred by Field ( ModelKey ) Referred by Field ( TypeModelKey -> ModelKey ) 🔍 Unq uk_Model ( ModelName ) ModelName⧉ ModelName * varchar(64) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The Unique Name of this Model. VARCHAR(64) ModelType⧉ ModelType * varchar(20) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Model Type Enumeration Valid Values: Entity, ComplexType Entity: The Model is an Entity and behaves like a proper OData Entity. ComplexType: The Model is a Complex Type, cannot be searched on, and is part of other Entities. VARCHAR(20) DisplayNames⧉ DisplayNames collection(i18nstring) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Contains the Collection of I18nString elements as a data structure as represented through the ModelDisplayNames object. Collection(I18nString) Definitions⧉ Definitions collection(i18nstring) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ A human readable description of what kind of data is represented by the Model. Collection(I18nString) ReadableYN⧉ ReadableYN * boolean ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ TRUE - Queries may be executed on this Model. FALSE - Queries may not be executed on this Model. BOOLEAN InsertableYN⧉ InsertableYN * boolean ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ TRUE - Data may be inserted into this Model. FALSE - Data may not be inserted into this Model. BOOLEAN UpdateableYN⧉ UpdateableYN * date ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ TRUE - Data may be updated in this Model. FALSE - Data may not be updated in this Model. DATE DeletableYN⧉ DeletableYN * date ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ TRUE - Data may be deleted from this Model. FALSE - Data may not be deleted from this Model. DATE PrimaryKeyFieldKey⧉ PrimaryKeyFieldKey varchar(20) ↗ Model( FieldKey ) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The foreign key to the Field, within the Model, that is the Primary Key of the rows in the Model. This is nullable since a Model may be just a ComplexType which does not require a primary key. VARCHAR(20)&#1F517; References Field ( PrimaryKeyFieldKey -> FieldKey ) ModificationTimestampFieldKey⧉ ModificationTimestampFieldKey varchar(20) ↗ Model( FieldKey ) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The foreign key to the Field, within the Model, that is the Field that indicates that a row in the Model has been updated. This is nullable since a Model may be just a ComplexType which does not require a primary key. VARCHAR(20)&#1F517; References Field ( ModificationTimestampFieldKey -> FieldKey ) ModificationTimestamp⧉ ModificationTimestamp * timestamp ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The timestamp when this Model record was last updated. TIMESTAMP ModelRelationshipTable reso meta-model.ModelRelationship ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ We can represent a single-part-key relationship easily with one row. We can represent a multi-part-key relationship easily with multiple rows. CollectionYN true means it's a 1:M relationship that is being defined, false means it's a1:1 relationship that is being defined. For multi-part-keys, we just need to have a consistent setting of the CollectionYN flag across all the records. 🔑 Pk pk_ModelRelationship ( ModelRelationshipKey ) ModelRelationshipKey⧉ ModelRelationshipKey * varchar(20) VARCHAR(20) 🔍 Unq uk_ModelRelationship ( SourceFieldKey, DestFieldKey ) SourceFieldKey⧉ SourceFieldKey * varchar(20) ↗ ModelRelationship( FieldKey ) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The primary key of the source Field defining the relationship. VARCHAR(20)&#1F517; References Field ( SourceFieldKey -> FieldKey ) 🔍 Unq uk_ModelRelationship ( SourceFieldKey, DestFieldKey ) DestFieldKey⧉ DestFieldKey * varchar(20) ↗ ModelRelationship( FieldKey ) ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The primary key of the destination Field defining the relationship. VARCHAR(20)&#1F517; References Field ( DestFieldKey -> FieldKey ) CollectionYN⧉ CollectionYN * boolean ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ TRUE - This is a 1:M Relationship. FALSE - This is a 1:1 Relationship. BOOLEAN ModificationTimestamp⧉ ModificationTimestamp * timestamp ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The timestamp when this ModelRelationship record was last updated. TIMESTAMP This model represents the meta-model that has been defined for RESO to provide meta-data for the Resources that are available in the server. This has been defined using a Database Modeler called DbSchema (dbschema.com) and, as such, we had to be a little creative when working with DIsplayNames and also had to deal with a pre-existing design for Lookup. Complex Types: This complex type outlines the data that goes into all the DisplayNames and Definitions fields. It happens to be a viable representation of how a database could store this data; however, the point is to just illustrate the contents of these fields. Lookup Resource: The Lookup Resource was in production before this model was created. Therefore, we needed to use a different logical representation to make this work. There is currently a single RESO Resource called Lookup. The LookupName object has been created to allow a Foreign Key reference to the Field object.




Table Field

Defines a set of fields that are within a specific model along with all details about the field.

IdxColumn NameData TypeDescription
* FieldKey VARCHAR(20) The primary key of the Field.
* ModelKey VARCHAR(20) The Foreign Key to the Model that this Field belongs to.
* FieldName VARCHAR(64) The name of this field which is unique within the Model.
LookupName VARCHAR(64) The name of the lookup that defines what data may go into this field.
  DisplayNames Collection(I18nString) Contains the Collection of I18nString elements as a data structure as represented through the FieldDisplayNames object.
  Definitions Collection(I18nString) A human readable description of what kind of data is represented by the Field.
  Type VARCHAR(20) The OData Data Type of this field. This field is optional, but if this field is null, then the TypeModelKey must be filled in.
TypeModelKey VARCHAR(20) If this field is an Entity or ComplexType, this field indicates the Model that represents this DataType.
* CollectionYN BOOLEAN TRUE - This field is a container of a Collection defined by TypeModelKey.
* NullableYN BOOLEAN This field may be null.
  Length INT The maximum length of the data that is contained within this field when the Type is Edm.String.
  Precision INT When the Type is Edm.Double or Edm.Decimal, represents the precision of the data contained within this field.
  Scale INT When the Type is Edm.Double or Edm.Decimal, represents the scale of the data contained within this field.
* OrderableYN BOOLEAN TRUE - This may not be in the order specified during a query.
FALSE - This field may not be in the order specified during a query.
* UpdatableYN BOOLEAN TRUE - This field is allowed to be updated by a client.
FALSE - This field may not be updated by a client.
* SearchableYN BOOLEAN TRUE - This field may be used in a filter during a query.
FALSE - This field may not be used in a filter during a query.
  ModificationTimestamp TIMESTAMP The timestamp when this Field record was last updated.
Indexes
pk_Field ON FieldKey
uk_Field ON ModelKey, FieldName
Foreign Key
fk_field_model ModelKey ↗ ❏ Model
fk_type_model TypeModelKey ↗ ❏ Model(ModelKey)
fk_field_lookup LookupName ↗ ❏ LookupName
Referring Foreign Key
fk_primary_field FieldKey ↙ ❏ Model(PrimaryKeyFieldKey)
fk_timestamp_field FieldKey ↙ ❏ Model(ModificationTimestampFieldKey)
fk_source_field FieldKey ↙ ❏ ModelRelationship(SourceFieldKey)
fk_dest_field FieldKey ↙ ❏ ModelRelationship(DestFieldKey)
Options
engine=InnoDB


Table I18nString

A ComplexType defining a Name and Value for a Localized display name.

Modeled as a table, but is simply a ComplexType.

The I18nStringKey is not expected to be in the output.

IdxColumn NameData TypeDescription
* Locale VARCHAR(20) The I18n Name of the Locale that this I18nString is for.
* Value VARCHAR(256) The string value to display to the end-user for the locale identified by Name.
Indexes
pk_I18nString ON Locale, Value
Options
engine=InnoDB


Table Lookup
IdxColumn NameData TypeDescription
* LookupKey VARCHAR(20) The primary key of this Lookup.
* LookupName VARCHAR(64) The name of the group of enumerations comprising the given lookup, aka picklist. It is called a "LookupName" in this proposal because more than one field can have a given lookup, so it refers to the name of the lookup rather than a given field. For example, Listing with CountyOrParish and Office with OfficeCountyOrParish having the same CountyOrParish LookupName. This MUST match the Data Dictionary definition for in cases where the lookup is defined. Vendors MAY add their own enumerations otherwise. The LookupName a given field uses is required to be annotated at the field level in the OData XML Metadata, as outlined later in this proposal.
* LookupValue VARCHAR(256) The human-friendly display name the data consumer receives in the payload and uses in queries. This MAY be a local name or synonym for a given RESO Data Dictionary lookup item.
  StandardLookupValue VARCHAR(256) The Data Dictionary StandardLookupValue of the enumerated value. This field is required when the LookupValue for a given item corresponds to a RESO standard value, meaning a standard lookup display name, known synonym, local name, or translation of that value. Local lookups MAY omit this value if they don't correspond to an existing RESO standard lookup value.
  LegacyODataValue VARCHAR(256) The Legacy OData lookup value that the server vendor provided in their OData XML Metadata. This value is optional, and has been included in order to provide a stable mechanism for translating OData lookup values to RESO standard lookup display names, as well as for historical data that might have included the OData value at some point, even after the vendor had converted to human friendly display names.
  DisplayNames Collection(I18nString) Contains the Collection of I18nString elements as a data structure as represented through the LookkupDisplayNames object.
* ModificationTimestamp TIMESTAMP The timestamp when this Lookup record was last updated.
Indexes
pk_Lookup ON LookupKey
uk_Lookup ON LookupName, LookupValue
Foreign Key
fk_lookup_ln LookupName ↗ ❏ LookupName
Options
engine=InnoDB


Table LookupName
IdxColumn NameData TypeDescription
* LookupName VARCHAR(64) The unique name of the defined lookup.

The name of the group of enumerations comprising the given lookup, aka picklist. It is called a "LookupName" in this proposal because more than one field can have a given lookup, so it refers to the name of the lookup rather than a given field. For example, Listing with CountyOrParish and Office with OfficeCountyOrParish having the same CountyOrParish LookupName. This MUST match the Data Dictionary definition for in cases where the lookup is defined. Vendors MAY add their own enumerations otherwise. The LookupName a given field uses is required to be annotated at the field level in the OData XML Metadata, as outlined later in this proposal.
Indexes
pk_LookupName ON LookupName
Referring Foreign Key
fk_field_lookup LookupName ↙ ❏ Field
fk_lookup_ln LookupName ↙ ❏ Lookup
Options
engine=InnoDB


Table Model

Every Resource that is available in a RESO server must have a record in this resource so that client applications can identify what resources are available to them.

The server may restrict the visibility of rows in this resource to just those that a client has access to.

IdxColumn NameData TypeDescription
* ModelKey VARCHAR(20) The primary key of this Model.
* ModelName VARCHAR(64) The Unique Name of this Model.
* ModelType VARCHAR(20) Model Type Enumeration

Valid Values: Entity, ComplexType

Entity: The Model is an Entity and behaves like a proper OData Entity.
ComplexType: The Model is a Complex Type, cannot be searched on, and is part of other Entities.
  DisplayNames Collection(I18nString) Contains the Collection of I18nString elements as a data structure as represented through the ModelDisplayNames object.
  Definitions Collection(I18nString) A human readable description of what kind of data is represented by the Model.
* ReadableYN BOOLEAN TRUE - Queries may be executed on this Model.
FALSE - Queries may not be executed on this Model.
* InsertableYN BOOLEAN TRUE - Data may be inserted into this Model.
FALSE - Data may not be inserted into this Model.
* UpdateableYN DATE TRUE - Data may be updated in this Model.
FALSE - Data may not be updated in this Model.
* DeletableYN DATE TRUE - Data may be deleted from this Model.
FALSE - Data may not be deleted from this Model.
PrimaryKeyFieldKey VARCHAR(20) The foreign key to the Field, within the Model, that is the Primary Key of the rows in the Model. This is nullable since a Model may be just a ComplexType which does not require a primary key.
ModificationTimestampFieldKey VARCHAR(20) The foreign key to the Field, within the Model, that is the Field that indicates that a row in the Model has been updated. This is nullable since a Model may be just a ComplexType which does not require a primary key.
* ModificationTimestamp TIMESTAMP The timestamp when this Model record was last updated.
Indexes
pk_Model ON ModelKey
uk_Model ON ModelName
Foreign Key
fk_primary_field PrimaryKeyFieldKey ↗ ❏ Field(FieldKey)
fk_timestamp_field ModificationTimestampFieldKey ↗ ❏ Field(FieldKey)
Referring Foreign Key
fk_field_model ModelKey ↙ ❏ Field
fk_type_model ModelKey ↙ ❏ Field(TypeModelKey)
Options
engine=InnoDB


Table ModelRelationship

We can represent a single-part-key relationship easily with one row.
We can represent a multi-part-key relationship easily with multiple rows.
CollectionYN true means it's a 1:M relationship that is being defined, false means it's a1:1 relationship that is being defined.
For multi-part-keys, we just need to have a consistent setting of the CollectionYN flag across all the records.

IdxColumn NameData TypeDescription
* ModelRelationshipKey VARCHAR(20)
* SourceFieldKey VARCHAR(20) The primary key of the source Field defining the relationship.
* DestFieldKey VARCHAR(20) The primary key of the destination Field defining the relationship.
* CollectionYN BOOLEAN TRUE - This is a 1:M Relationship.
FALSE - This is a 1:1 Relationship.
* ModificationTimestamp TIMESTAMP The timestamp when this ModelRelationship record was last updated.
Indexes
pk_ModelRelationship ON ModelRelationshipKey
uk_ModelRelationship ON SourceFieldKey, DestFieldKey
Foreign Key
fk_source_field SourceFieldKey ↗ ❏ Field(FieldKey)
fk_dest_field DestFieldKey ↗ ❏ Field(FieldKey)
Options
engine=InnoDB