Skip to main content

Intro to data modeling (2 min)

Data modeling makes it easier for developers, data architects, business analysts, and other stakeholders to view and understand relationships between data objects.

Resource types

A data model organizes data objects and standardizes the properties of real-world entities and how they relate to one another. Data models are the core of an ontology, a knowledge graph, or an industry standard and are crucial in building solutions like data science models, mobile apps, and web apps.

Data modeling concepts

The data modeling building blocks are data models, data types, instances, and spaces.

  • Data model: A data model represents data entities and how they relate to each other. Data models vary in size to represent anything from large and complex ontologies to simple use cases like in this short tutorial. Regardless of their complexity and size, each data model is composed of data types.

  • Data type: A data type represents the structure of an entity and is analogous to a database table or view. In CDF, you can import and reuse data types across data models.

    Each data type is composed of fields that describe the attributes of the entity. Each field also specifies what type of data represents the attribute, for example, when defining a Pump, it can have the following fields:

    • weight contains data of Number type
    • active_status contains data of Boolean type
    • name contains data of String (text) type

    Fields can contain data that is represented by a CDF data resource type, such as

    • sensor_data contains data of TimeSeries type
    • manuals contains a list of File type

    Fields can also refer to other data types in the data model, such as:

    • operates_in contains data of Facility type
    • flows_to contains data of Valve type

    The structure of data entities can evolve; therefore, you can version each data type and data model.

  • Instance: A data entity that conforms to the structure of one of the data types defined in the data model.

  • Space: A workspace for data models and instances. You can scope access control to spaces, for example, to define who can read or write to your data model or instances.

Together, data models, data types, instances, and versioning allow you to understand and communicate the relationship between data and conform to your data governance policies.

Let's get started

This short data modeling tutorial introduces you to core data modeling concepts like inheritance and relations. You'll model movies and people and their appearance as directors or actors in the movies:

  1. Optional: Upload demo data to CDF to follow the steps hands-on in your CDF project.
  2. Create a data model.
  3. Populate a data model.
  4. Query a data model.