How to Design DataModels - 8th May 2019
Corresponding webinar recording: https://youtu.be/T_1DpKf6C_c
Understanding and applying Standard Data Models.
Chapter: Core
Difficulty: 3
Audience: Technical Domain Specific
Presenter: José Manuel Cantera (Senior Standardization Expert, FIWARE Foundation)
Report
Share
Report
Share
1 of 21
More Related Content
FIWARE Wednesday Webinars - How to Design DataModels
1. Data Modelling with NGSI
José Manuel Cantera Fonseca – FIWARE Foundation
May 2019 (Aligned with ETSI ISG CIM)
5. 4
Information Model - Highlights
NGSI Entity Physical or virtual object.
It has (one) Entity Type.
Uniquely identified by an Entity Id (URI, mandatory in NGSI-LD)
Entity has zero or more attributes identified by a name
Property --> Static or dynamic intrinsic characteristic of an Entity
GeoProperty (geospatial context)
Relationship Association with a Linked entity (unidirectional)
Properties have a value. An NGSI value can be
single value (Number, String, boolean, DateTime).
null is not allowed in NGSI-LD and not recommended.
complex (Array, Structured Value)
Relationships have an object
A URI which points to another entity (target of the relationship). Target can be a collection.
6. 5
Information Model – Highlights (II)
Cross-Domain, core properties for giving context to your information are
defined in a mandatory way, to be used by API operations (e.g. geo queries)
location Geospatial location, encoded as GeoJSON.
observedAt Observation timestamp, encoded as ISO8601. (timestamp in NGSIv2)
createdAt Creation timestamp (of entity, attribute). dateCreated in NGSIv2
modifiedAt Update timestamp (of entity, attribute). dateModified in NGSIv2
unitCode Units of measurement, encoded as mandated by UN/CEFACT.
Recommended practice
Use URIs to identify your entities. (Mandatory in NGSI-LD).
A URN schema is provided off-the-shelf. It enables to know in advance what Entity Type
an Entity id refers to
urn:ngsi-ld:<Entity_Type_Name>:<Entity_Identification_String>
18. 17
FIWARE Data Models
Landing page: https://schema.fiware.org
Open source project that has developed multiple data models
https://github.com/FIWARE/dataModels
Mainly for the Smart City domain but also some for the Smart Agrifood domain
Specifications are crafted using markdown + JSON Schema
Example Weather observed data model
https://github.com/Fiware/dataModels/blob/master/specs/Weather/WeatherObserved/doc/spec.md
https://fiware.github.io/dataModels/specs/Weather/WeatherObserved/schema.json
Data Models Guidelines (how to develop new Data Models)
https://github.com/Fiware/dataModels/blob/master/specs/guidelines.md
Pull Request – Review Lifecycle.