locationattributetype
Table Name: locationattributetype
The locationattributetype table defines the types of attributes that can be assigned to locations. It acts as a reference table to standardize attribute types, ensuring consistency in the categorization and data structure of location attributes.
Columns
| Column Name | Data Type | Description |
|---|---|---|
| locationAttributeTypeId | int(11) | The primary key, uniquely identifying each attribute type. |
| attributeName | varchar(255) | The name of the attribute type. |
| category | varchar(255) | The category or grouping of the attribute type, if applicable. |
| dataType | varchar(45) | The expected data type (e.g., string, integer) for the attribute's values. |
| description | varchar(255) | A brief description of the attribute type. |
| displayName | varchar(255) | A user-friendly display name for the attribute type. |
| createdDate | datetime | The date when the attribute type was created. |
| createdByUserId | int(11) | The user who created the attribute type, referencing the user table. |
| lastEditedByUserId | int(11) | The user who last edited the attribute type, referencing the user table. |
| lastEditedDate | datetime | The date when the attribute type was last modified. |
Indexes
- Unique Indexes:
- locationAttributeTypeId_UNIQUE: Ensures the uniqueness of the primary key locationAttributeTypeId.
- attributeName_UNIQUE: Guarantees that attribute names are unique across the table, preventing duplicates.
Foreign Key Relations
The locationattributetype table does not directly reference other tables with foreign key constraints. However, it is indirectly connected through its integration with the locationattribute table.
Usage Notes
- Attribute Standardization:
This table enforces consistent definitions of attribute types, ensuring that location attributes in the locationattribute table adhere to predefined types. - Categorization:
The category column can be used to group related attributes, aiding in organization and querying. - Flexible Data Definition:
The dataType column provides a mechanism for defining the expected data type of attribute values, enabling validation and type-specific processing. - Change Tracking:
Audit fields such as createdDate, createdByUserId, lastEditedDate, and lastEditedByUserId facilitate tracking of changes to attribute type definitions. - Integration:
The locationattributetype table is a critical component of the location metadata model, directly linking to the locationattribute table to enforce attribute type consistency.