Data modeling concepts and features¶
A data model is an abstract representation of real-world entities. It organizes data elements and their properties and standardizes how they relate.
The Data Modeling Service (DMS) REST API lets you create, update, and delete spaces, instances, containers, and views to form an industrial knowledge graph.
The knowledge graph is implemented as a property graph that represents a well-defined structure consisting of nodes and edges. Both nodes and edges can have properties.
A knowledge graph is a detailed digital map of an industrial ecosystem, with data models acting as blueprints to build the integrated representation. Each data model has containers and views to store and access data efficiently and reliably.
Container¶
Containers are the physical storage for properties. They're defined within a space and hold a set of properties that logically belong together.
You must define types for your properties, and you can add optional constraints that the data in the container must adhere to. You can also define indexes for properties or groups of properties to optimize query performance.
View¶
Use views to create logical schemas to consume from or populate a graph. Tailor the views to meet the needs of specific use cases. Like containers, views contain a group of properties. You define views by either mapping container properties or by creating connection properties to express the expected relationships in the graph.
Containers and views example¶
Imagine that you need to analyze data from a factory assembly line. Your data model is the blueprint for the analysis, with views and containers defining how to store and access data efficiently and reliably. The data model could have these views and containers:
flowchart LR
style view1 fill:#f96
style view2 fill:#f96
style container1 fill:#B6D7A8
style container2 fill:#B6D7A8
style container3 fill:#B6D7A8
view1-. readings last month .-> container1
view1-. readings last month .->container2
view2-. wear and tear .->container1
view2-. maintenance history and age .->container3
subgraph "`**Views**`"
view1(Machine\nperformance)
view2(Predictive\nmaintenance)
end
subgraph "`**Containers**`"
container1[(Sensor\nreadings)]
container2[(Production\ndata)]
container3[(Equipment\ninformation)]
end
-
The Machine performance view retrieves last month's data from the Sensor readings and Production data containers to analyze how the equipment performs.
-
The Predictive maintenance view draws data from the Sensor readings container, focusing on readings that might indicate wear and tear. Also, it retrieves data from the Equipment information container, like maintenance history and machine age, to identify potential equipment failures.
Space¶
A space can contain both schemas and instances, and is an efficient resource to organize your graph. It functions as a namespace, and lets you choose identifiers without interference from other spaces.
For access management, you can use CDF user groups and capabilities to define who has access to read from and write to a space. You can, for example, create a data model in a protected space to prevent it from being changed, and then create instances in a space where users can read and write to the data.
To delete a space, you have to remove all schema resources assigned to it first.
Instance¶
Instance is an umbrella term for nodes and edges. Instances have a set of core properties that are consistently present in every instance.
-
Nodes can represent anything, for example, real-world objects like pumps,
-
Edges describe relationships between nodes.
Every instance has an external ID that must be unique for that space.