Data model is one special kind of models (along with the other kinds are ThingModels and AppModels). Therefore it has all the properties of Models (Lifecycle of models, Model Attributes, Unique and Constraints).
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<DataModel Name="VendorInfo"> <Sid name="VendorSysId"/> <String name="vendorName"/> <String name="vendorTitle"/> </DataModel> |
DataModels by default contain an Attribute of type SystemId (or Sid). If the Sid name is not defined, _____? DataModel is often used in TQL applications to represent logical entities (versus physical things that have direct interactions with the application). For example, a user, a vendor, or a ladder.
The purpose of DataModel is to store just enough data that may be required to complete IoT Application logic. DataModels are not meant for general purpose large volume of transnational data.
...
.
DataModel can be created, read, update and deleted using TQL CRUD Queries.
...
System Attribute Name | Description |
---|---|
Value | The value of the attribute is stored in "Value". This is specified by user at time of create query |
Known | Applicable to ThingFacet/AppFacet - this is the value that is set within the Action. Known can not be set using Create / Update TQL Query by the user. |
Version | Version number of the attribute. This number is automatically incremented each time the value changes. |
Timestamp | Unix epoch time at the time (in millisecond) of the attribute creation. For example: Timestamp value1457663102004 is same as Fri, 11 Mar 2016 02:25:02 GMT |
Datetime | Formatted data time value of the attribute creation. For example:2016-03-10 18:25:02.004 |
QName | Fully qualified name of the attribute. <NamSpace>.<Domain>.<ModelName>.<AttributeName>. For example SimpleModel.MyModels.VendorInfo.vendorName given that VendorInfo is defined within Namespace - SimpleModel, with Domain as MyModels and DataModel Name as VendorInfo |
FName | Given name of the attribute name. |
...