SlideShare a Scribd company logo
Data Modelling with NGSI
José Manuel Cantera Fonseca – FIWARE Foundation
May 2019 (Aligned with ETSI ISG CIM)
Information Model
1
2
Information Model
Attributes
• Name
• Type
• Value
Entity
• EntityId
• EntityType
1 n
“has”
Metadata
• Name
• Type
• Value1 n
“has”
2
3
Information Model (as UML) – NGSI-LD
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.
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>
Case of Study 1
Smart City
6
7
Smart City Data Model
Source: ETSI
Specification
8
Classical JSON Representation (a.k.a. NGSIv2)
{
"id": "urn:ngsi-ld:Vehicle:A4567",
"type": "Vehicle",
"brandName": {
"type": "Property",
"value": "Mercedes"
},
"isParked": {
"type": "Relationship",
"value": "urn:ngsi-ld:OffStreetParking:Downtown1",
"metadata": {
”timestamp": {
"value" : "2017-07-29T12:00:04Z",
"type" : "DateTime"
},
"providedBy": {
"type" : "Relationship",
"value" : "urn:ngsi-ld:Person:Bob"
}
}
}
}
{
"id": "urn:ngsi-ld:OffStreetParking:Downtown1",
"type": "OffStreetParking",
"availableSpotNumber": {
"type": "Property",
"value": 121,
"metadata" : {
”timestamp": {
"value" : "2017-07-29T12:00:04Z",
"type" : "DateTime"
},
"reliability": {
"type" : "Property",
"value" : 0.7
},
"providedBy": {
"type" : "Relationship",
"value" : "urn:ngsi-ld:Camera:C1"
}
}
},
"location": {
"type": "geo:json",
"value": {
"type": "Point",
"coordinates": [-8.5, 41.2]
}
}
}
9
JSON-LD (RDF friendly) representation (a.k.a. NGSI-LD)
{
"id": "urn:ngsi-ld:Vehicle:A4567",
"type": "Vehicle",
"brandName": {
"type": "Property",
"value": "Mercedes"
},
"isParked": {
"type": "Relationship",
"object": "urn:ngsi-ld:OffStreetParking:Downtown1",
"observedAt": "2017-07-29T12:00:04Z",
"providedBy": {
"type": "Relationship",
"object": "urn:ngsi-ld:Person:Bob"
}
},
"@context": [
"https://uri.etsi.org/ngsi-ld/v1/",
"https://schema.lab.fiware.org/ld/context/"
]
}
{
"id": "urn:ngsi-ld:OffStreetParking:Downtown1",
"type": "OffStreetParking",
"availableSpotNumber": {
"type": "Property",
"value": 121,
"observedAt": "2017-07-29T12:05:02Z",
"reliability": {
"type": "Property",
"value": 0.7
},
"providedBy": {
"type": "Relationship",
"object": "urn:ngsi-ld:Camera:C1"
}
},
"location": {
"type": "GeoProperty",
"value": {
"type": "Point",
"coordinates": [-8.5, 41.2]
}
},
"@context": [
"https://uri.etsi.org/ngsi-ld/v1/",
"https://schema.lab.fiware.org/ld/context/"
]
}
10
Simplified representation (keyValues)
{
"id": "urn:ngsi-ld:OffStreetParking:Downtown1",
"type": "OffStreetParking",
"name": "Downtown One",
"availableSpotNumber": 121,
"totalSpotNumber": 200,
"location": {
"type": "Point",
"coordinates": [-8.5, 41.2]
},
"@context": [
"https://uri.etsi.org/ngsi-ld/v1/",
"https://schema.lab.fiware.org/ld/context/"
]
}
Equivalent in NGSI-LD and NGSIv2
Case of Study 2
Smart Agrifood
11
1
2
Data Model: Smart Agrifood
13
Classical JSON Representation (a.k.a. NGSIv2)
{
"id": "urn:ngsi-ld:Tractor:A4567",
"type": ”Tractor",
"brandName": {
"type": "Property",
"value": ”John Deere"
},
"speed": {
type": "Property"
"value": 12,
"metadata": {
”timestamp": {
"value" : "2017-07-29T12:00:04Z",
"type" : "DateTime"
}
}
},
"isLabouring": {
"type": "Relationship",
"value": "urn:ngsi-ld:AgriParcel:A456",
"metadata": {
"startedAt": {
"value" : "2017-07-29T12:00:04Z",
"type" : "DateTime"
}
}
}
}
{
"id": "urn:ngsi-ld:AgriParcel:A456",
"type": ”AgriParcel",
"location": {
"type" : "geo:json" {
"value" : {
"type": "Polygon",
"coordinates": [
[
100,
0
],
[
101,
0
],
[
101,
1
],
[
100,
1
],
[
100,
0
]
] }
}
}
14
JSON-LD (RDF friendly) representation (a.k.a. NGSI-LD)
{
"id": "urn:ngsi-ld:Tractor:A4567",
"type": ”Tractor",
"brandName": {
"type": "Property",
"value": "Mercedes"
},
"speed" : {
"type": "Property",
"value": 12,
"observedAt": "2017-07-29T12:01:32Z"
},
"isLabouring": {
"type": "Relationship",
"object": "urn:ngsi-ld:AgriParcel:A456",
”startedAt": {
"type": "Property",
"value": "2017-07-29T12:00:04Z"
}
},
"@context": [
"https://uri.etsi.org/ngsi-ld/v1/",
"https://schema.lab.fiware.org/ld/context/"
]
}
{
"id": "urn:ngsi-ld:AgriParcel:A456",
"type": "AgriParcel",
"location": {
"type" : "GeoProperty" {
"value" : {
"type": "Polygon",
"coordinates": [
[
100,
0
],
[
101,
0
],
[
101,
1
],
[
100,
1
],
[
100,
0
]
] }
},
"@context": [
"https://uri.etsi.org/ngsi-ld/v1/",
"https://schema.lab.fiware.org/ld/context/"
]
}
15
Simplified representation (keyValues)
{
"id": "urn:ngsi-ld:Tractor:A4567",
"type": ”Tractor",
”brandName": ”John Deere",
”speed": 12,
”isLabouring": ”urn:ngsi-ld:AgriParcel:A456",
"@context": [
"https://uri.etsi.org/ngsi-ld/v1/",
"https://schema.lab.fiware.org/ld/context/"
]
}
Equivalent in NGSI-LD and NGSIv2
FIWARE Data Models
1
6
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.
See also
1
8
19
References
 NGSI-LD FAQ
 https://github.com/FIWARE/dataModels/blob/master/specs/ngsi-ld_faq.md
 NGSI-LD HowTo
 https://github.com/FIWARE/dataModels/blob/master/specs/ngsi-ld_howto.md
 ETSI NGSI-LD Specification (January 2019)
 https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.01.01_60/gs_CIM009v010101p.pdf
 https://docbox.etsi.org/isg/cim/open/Presentation_for_WoT_Plenary_Meeting_Lyon__TPAC_.pdf
 FIWARE NGSIv2 Specification
 http://fiware.github.io/specifications/ngsiv2/stable/
Thank you!
http://fiware.org
Follow @FIWARE on Twitter
José Manuel Cantera Fonseca
FIWARE Foundation
Josemanuel.cantera@fiware.org

More Related Content

PPTX
FIWARE Wednesday Webinars - FIWARE Overview
FIWARE
 
PPTX
FIWARE Wednesday Webinars - How to Secure FIWARE Architectures
FIWARE
 
PDF
FIWARE Wednesday Webinars - Introduction to NGSI-LD
FIWARE
 
PDF
Creating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
Fernando Lopez Aguilar
 
PDF
FIWARE Global Summit - NGSI-LD - NGSI with Linked Data
FIWARE
 
PPTX
FIWARE Wednesday Webinars - Core Context Management
FIWARE
 
PPTX
FIWARE Wednesday Webinars - IoT Agents
FIWARE
 
PDF
FIWARE Training: IoT and Legacy
FIWARE
 
FIWARE Wednesday Webinars - FIWARE Overview
FIWARE
 
FIWARE Wednesday Webinars - How to Secure FIWARE Architectures
FIWARE
 
FIWARE Wednesday Webinars - Introduction to NGSI-LD
FIWARE
 
Creating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
Fernando Lopez Aguilar
 
FIWARE Global Summit - NGSI-LD - NGSI with Linked Data
FIWARE
 
FIWARE Wednesday Webinars - Core Context Management
FIWARE
 
FIWARE Wednesday Webinars - IoT Agents
FIWARE
 
FIWARE Training: IoT and Legacy
FIWARE
 

What's hot (20)

PDF
Data persistency (draco, cygnus, sth comet, quantum leap)
Fernando Lopez Aguilar
 
PPTX
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
Vietnam Open Infrastructure User Group
 
PPTX
FIWARE and Smart Data Models
Fernando Lopez Aguilar
 
PPTX
Google Cloud and Data Pipeline Patterns
Lynn Langit
 
PDF
Kong, Keyrock, Keycloak, i4Trust - Options to Secure FIWARE in Production
FIWARE
 
PPTX
Room 1 - 6 - Trần Quốc Sang - Autoscaling for multi cloud platform based on S...
Vietnam Open Infrastructure User Group
 
PDF
FIWARE Global Summit - NGSI-LD – an Evolution from NGSIv2
FIWARE
 
PDF
Intro to Telegraf
InfluxData
 
PDF
Fluentd vs. Logstash for OpenStack Log Management
NTT Communications Technology Development
 
PPTX
IBM RedHat OCP Vs xKS.pptx
ssuser666667
 
PPSX
Cloud Architecture - Multi Cloud, Edge, On-Premise
Araf Karsh Hamid
 
PDF
Session 2 - NGSI-LD primer & Smart Data Models | Train the Trainers Program
FIWARE
 
PPTX
Azure DataBricks for Data Engineering by Eugene Polonichko
Dimko Zhluktenko
 
PDF
Session 5 - NGSI-LD Advanced Operations | Train the Trainers Program
FIWARE
 
PPTX
NGSIv1 を知っている開発者向けの NGSIv2 の概要 (Orion 1.13.0対応)
fisuda
 
PDF
FIWARE Global Summit - Idra: A Solution for Open Data Interoperability
FIWARE
 
PDF
Introduction to elasticsearch
pmanvi
 
PPTX
Log management with ELK
Geert Pante
 
PDF
How Netflix Is Solving Authorization Across Their Cloud
Torin Sandall
 
PDF
Vertex AI - Unified ML Platform for the entire AI workflow on Google Cloud
Márton Kodok
 
Data persistency (draco, cygnus, sth comet, quantum leap)
Fernando Lopez Aguilar
 
Room 3 - 7 - Nguyễn Như Phúc Huy - Vitastor: a fast and simple Ceph-like bloc...
Vietnam Open Infrastructure User Group
 
FIWARE and Smart Data Models
Fernando Lopez Aguilar
 
Google Cloud and Data Pipeline Patterns
Lynn Langit
 
Kong, Keyrock, Keycloak, i4Trust - Options to Secure FIWARE in Production
FIWARE
 
Room 1 - 6 - Trần Quốc Sang - Autoscaling for multi cloud platform based on S...
Vietnam Open Infrastructure User Group
 
FIWARE Global Summit - NGSI-LD – an Evolution from NGSIv2
FIWARE
 
Intro to Telegraf
InfluxData
 
Fluentd vs. Logstash for OpenStack Log Management
NTT Communications Technology Development
 
IBM RedHat OCP Vs xKS.pptx
ssuser666667
 
Cloud Architecture - Multi Cloud, Edge, On-Premise
Araf Karsh Hamid
 
Session 2 - NGSI-LD primer & Smart Data Models | Train the Trainers Program
FIWARE
 
Azure DataBricks for Data Engineering by Eugene Polonichko
Dimko Zhluktenko
 
Session 5 - NGSI-LD Advanced Operations | Train the Trainers Program
FIWARE
 
NGSIv1 を知っている開発者向けの NGSIv2 の概要 (Orion 1.13.0対応)
fisuda
 
FIWARE Global Summit - Idra: A Solution for Open Data Interoperability
FIWARE
 
Introduction to elasticsearch
pmanvi
 
Log management with ELK
Geert Pante
 
How Netflix Is Solving Authorization Across Their Cloud
Torin Sandall
 
Vertex AI - Unified ML Platform for the entire AI workflow on Google Cloud
Márton Kodok
 
Ad

Similar to FIWARE Wednesday Webinars - How to Design DataModels (20)

PDF
Data Modeling with NGSI, NGSI-LD
Fernando Lopez Aguilar
 
PDF
FIWARE Global Summit - FIWARE Context Information Management
FIWARE
 
PDF
FIWARE Global Summit - Hands-On NGSI-LD
FIWARE
 
PDF
FIWARE Training: JSON-LD and NGSI-LD
FIWARE
 
PDF
JSON-LD and NGSI-LD
FIWARE
 
PDF
FIWARE Training: JSON-LD and NGSI-LD
FIWARE
 
PDF
FIWARE Training: NGSI-LD Introduction
FIWARE
 
PDF
NGSI-LD Introduction
FIWARE
 
PDF
FIWARE Global Summit - NGSI-LD: Modelling, Linking and Utilizing Context Info...
FIWARE
 
PDF
Seongmyung_Jeong_Presentation.pdf
alamak88w
 
PDF
Actuation, Federation and Interoperability of Context Brokers
FIWARE
 
PDF
FIWARE Training: NGSI-LD Advanced Operations
FIWARE
 
PDF
Session-2_ETSI-ISG-CIM_EG4U_NGSI-LD_Overview_and_Status_final_Mike-Fischer.pdf
alamak88w
 
PDF
NGSI-LD Advanced Operations
FIWARE
 
PDF
NGSI-LD IoT Agents
FIWARE
 
PPTX
MartinBauer-NGSI-LD_Roadmap.pptx
FIWARE
 
PDF
Core Context Management
Fernando Lopez Aguilar
 
PDF
Semantic Discovery and Integration of Urban Data Streams
Ali Intizar
 
PPTX
Towards Digital Twin standards following an open source approach
FIWARE
 
PPT
A Knowledge-based Approach for Real-Time IoT Stream Annotation and Processing
PayamBarnaghi
 
Data Modeling with NGSI, NGSI-LD
Fernando Lopez Aguilar
 
FIWARE Global Summit - FIWARE Context Information Management
FIWARE
 
FIWARE Global Summit - Hands-On NGSI-LD
FIWARE
 
FIWARE Training: JSON-LD and NGSI-LD
FIWARE
 
JSON-LD and NGSI-LD
FIWARE
 
FIWARE Training: JSON-LD and NGSI-LD
FIWARE
 
FIWARE Training: NGSI-LD Introduction
FIWARE
 
NGSI-LD Introduction
FIWARE
 
FIWARE Global Summit - NGSI-LD: Modelling, Linking and Utilizing Context Info...
FIWARE
 
Seongmyung_Jeong_Presentation.pdf
alamak88w
 
Actuation, Federation and Interoperability of Context Brokers
FIWARE
 
FIWARE Training: NGSI-LD Advanced Operations
FIWARE
 
Session-2_ETSI-ISG-CIM_EG4U_NGSI-LD_Overview_and_Status_final_Mike-Fischer.pdf
alamak88w
 
NGSI-LD Advanced Operations
FIWARE
 
NGSI-LD IoT Agents
FIWARE
 
MartinBauer-NGSI-LD_Roadmap.pptx
FIWARE
 
Core Context Management
Fernando Lopez Aguilar
 
Semantic Discovery and Integration of Urban Data Streams
Ali Intizar
 
Towards Digital Twin standards following an open source approach
FIWARE
 
A Knowledge-based Approach for Real-Time IoT Stream Annotation and Processing
PayamBarnaghi
 
Ad

More from FIWARE (20)

PPTX
Behm_Herne_NeMo_akt.pptx
FIWARE
 
PDF
Katharina Hogrebe Herne Digital Days.pdf
FIWARE
 
PPTX
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
FIWARE
 
PPTX
Behm_Herne_NeMo.pptx
FIWARE
 
PPTX
Evangelists + iHubs Promo Slides.pptx
FIWARE
 
PPTX
Lukas Künzel Smart City Operating System.pptx
FIWARE
 
PPTX
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
FIWARE
 
PPTX
Dennis Wendland_The i4Trust Collaboration Programme.pptx
FIWARE
 
PPTX
Ulrich Ahle_FIWARE.pptx
FIWARE
 
PPTX
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
FIWARE
 
PDF
Water Quality - Lukas Kuenzel.pdf
FIWARE
 
PPTX
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
FIWARE
 
PPTX
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
FIWARE
 
PPTX
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
FIWARE
 
PPTX
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
FIWARE
 
PDF
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
FIWARE
 
PDF
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FIWARE
 
PPTX
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
FIWARE
 
PPTX
WE_LoRaWAN _ IoT.pptx
FIWARE
 
PPTX
EU Opp_Clara Pezuela - German chapter.pptx
FIWARE
 
Behm_Herne_NeMo_akt.pptx
FIWARE
 
Katharina Hogrebe Herne Digital Days.pdf
FIWARE
 
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
FIWARE
 
Behm_Herne_NeMo.pptx
FIWARE
 
Evangelists + iHubs Promo Slides.pptx
FIWARE
 
Lukas Künzel Smart City Operating System.pptx
FIWARE
 
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
FIWARE
 
Dennis Wendland_The i4Trust Collaboration Programme.pptx
FIWARE
 
Ulrich Ahle_FIWARE.pptx
FIWARE
 
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
FIWARE
 
Water Quality - Lukas Kuenzel.pdf
FIWARE
 
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
FIWARE
 
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
FIWARE
 
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
FIWARE
 
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
FIWARE
 
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
FIWARE
 
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FIWARE
 
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
FIWARE
 
WE_LoRaWAN _ IoT.pptx
FIWARE
 
EU Opp_Clara Pezuela - German chapter.pptx
FIWARE
 

Recently uploaded (20)

PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
The Future of Artificial Intelligence (AI)
Mukul
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 

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)
  • 3. 2 Information Model Attributes • Name • Type • Value Entity • EntityId • EntityType 1 n “has” Metadata • Name • Type • Value1 n “has” 2
  • 4. 3 Information Model (as UML) – NGSI-LD
  • 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>
  • 7. Case of Study 1 Smart City 6
  • 8. 7 Smart City Data Model Source: ETSI Specification
  • 9. 8 Classical JSON Representation (a.k.a. NGSIv2) { "id": "urn:ngsi-ld:Vehicle:A4567", "type": "Vehicle", "brandName": { "type": "Property", "value": "Mercedes" }, "isParked": { "type": "Relationship", "value": "urn:ngsi-ld:OffStreetParking:Downtown1", "metadata": { ”timestamp": { "value" : "2017-07-29T12:00:04Z", "type" : "DateTime" }, "providedBy": { "type" : "Relationship", "value" : "urn:ngsi-ld:Person:Bob" } } } } { "id": "urn:ngsi-ld:OffStreetParking:Downtown1", "type": "OffStreetParking", "availableSpotNumber": { "type": "Property", "value": 121, "metadata" : { ”timestamp": { "value" : "2017-07-29T12:00:04Z", "type" : "DateTime" }, "reliability": { "type" : "Property", "value" : 0.7 }, "providedBy": { "type" : "Relationship", "value" : "urn:ngsi-ld:Camera:C1" } } }, "location": { "type": "geo:json", "value": { "type": "Point", "coordinates": [-8.5, 41.2] } } }
  • 10. 9 JSON-LD (RDF friendly) representation (a.k.a. NGSI-LD) { "id": "urn:ngsi-ld:Vehicle:A4567", "type": "Vehicle", "brandName": { "type": "Property", "value": "Mercedes" }, "isParked": { "type": "Relationship", "object": "urn:ngsi-ld:OffStreetParking:Downtown1", "observedAt": "2017-07-29T12:00:04Z", "providedBy": { "type": "Relationship", "object": "urn:ngsi-ld:Person:Bob" } }, "@context": [ "https://uri.etsi.org/ngsi-ld/v1/", "https://schema.lab.fiware.org/ld/context/" ] } { "id": "urn:ngsi-ld:OffStreetParking:Downtown1", "type": "OffStreetParking", "availableSpotNumber": { "type": "Property", "value": 121, "observedAt": "2017-07-29T12:05:02Z", "reliability": { "type": "Property", "value": 0.7 }, "providedBy": { "type": "Relationship", "object": "urn:ngsi-ld:Camera:C1" } }, "location": { "type": "GeoProperty", "value": { "type": "Point", "coordinates": [-8.5, 41.2] } }, "@context": [ "https://uri.etsi.org/ngsi-ld/v1/", "https://schema.lab.fiware.org/ld/context/" ] }
  • 11. 10 Simplified representation (keyValues) { "id": "urn:ngsi-ld:OffStreetParking:Downtown1", "type": "OffStreetParking", "name": "Downtown One", "availableSpotNumber": 121, "totalSpotNumber": 200, "location": { "type": "Point", "coordinates": [-8.5, 41.2] }, "@context": [ "https://uri.etsi.org/ngsi-ld/v1/", "https://schema.lab.fiware.org/ld/context/" ] } Equivalent in NGSI-LD and NGSIv2
  • 12. Case of Study 2 Smart Agrifood 11
  • 14. 13 Classical JSON Representation (a.k.a. NGSIv2) { "id": "urn:ngsi-ld:Tractor:A4567", "type": ”Tractor", "brandName": { "type": "Property", "value": ”John Deere" }, "speed": { type": "Property" "value": 12, "metadata": { ”timestamp": { "value" : "2017-07-29T12:00:04Z", "type" : "DateTime" } } }, "isLabouring": { "type": "Relationship", "value": "urn:ngsi-ld:AgriParcel:A456", "metadata": { "startedAt": { "value" : "2017-07-29T12:00:04Z", "type" : "DateTime" } } } } { "id": "urn:ngsi-ld:AgriParcel:A456", "type": ”AgriParcel", "location": { "type" : "geo:json" { "value" : { "type": "Polygon", "coordinates": [ [ 100, 0 ], [ 101, 0 ], [ 101, 1 ], [ 100, 1 ], [ 100, 0 ] ] } } }
  • 15. 14 JSON-LD (RDF friendly) representation (a.k.a. NGSI-LD) { "id": "urn:ngsi-ld:Tractor:A4567", "type": ”Tractor", "brandName": { "type": "Property", "value": "Mercedes" }, "speed" : { "type": "Property", "value": 12, "observedAt": "2017-07-29T12:01:32Z" }, "isLabouring": { "type": "Relationship", "object": "urn:ngsi-ld:AgriParcel:A456", ”startedAt": { "type": "Property", "value": "2017-07-29T12:00:04Z" } }, "@context": [ "https://uri.etsi.org/ngsi-ld/v1/", "https://schema.lab.fiware.org/ld/context/" ] } { "id": "urn:ngsi-ld:AgriParcel:A456", "type": "AgriParcel", "location": { "type" : "GeoProperty" { "value" : { "type": "Polygon", "coordinates": [ [ 100, 0 ], [ 101, 0 ], [ 101, 1 ], [ 100, 1 ], [ 100, 0 ] ] } }, "@context": [ "https://uri.etsi.org/ngsi-ld/v1/", "https://schema.lab.fiware.org/ld/context/" ] }
  • 16. 15 Simplified representation (keyValues) { "id": "urn:ngsi-ld:Tractor:A4567", "type": ”Tractor", ”brandName": ”John Deere", ”speed": 12, ”isLabouring": ”urn:ngsi-ld:AgriParcel:A456", "@context": [ "https://uri.etsi.org/ngsi-ld/v1/", "https://schema.lab.fiware.org/ld/context/" ] } Equivalent in NGSI-LD and NGSIv2
  • 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.
  • 20. 19 References  NGSI-LD FAQ  https://github.com/FIWARE/dataModels/blob/master/specs/ngsi-ld_faq.md  NGSI-LD HowTo  https://github.com/FIWARE/dataModels/blob/master/specs/ngsi-ld_howto.md  ETSI NGSI-LD Specification (January 2019)  https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.01.01_60/gs_CIM009v010101p.pdf  https://docbox.etsi.org/isg/cim/open/Presentation_for_WoT_Plenary_Meeting_Lyon__TPAC_.pdf  FIWARE NGSIv2 Specification  http://fiware.github.io/specifications/ngsiv2/stable/