Defines a set of fields that are within a specific model along with all details about the field.
| Idx | Column Name | Data Type | Description |
|---|---|---|---|
| * | 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 | |||
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.
| Idx | Column Name | Data Type | Description |
|---|---|---|---|
| * | 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 | |||
| Idx | Column Name | Data Type | Description |
|---|---|---|---|
| * | 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 | |||
| Idx | Column Name | Data Type | Description |
|---|---|---|---|
| * | 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 | |||
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.
| Idx | Column Name | Data Type | Description |
|---|---|---|---|
| * | 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 | |||
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.
| Idx | Column Name | Data Type | Description |
|---|---|---|---|
| * | 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 | |||