Data Modeling Basics

An introduction to data modeling and modeling terminology common to relational and graph databases.

The importance of data modeling

The correct organization of data and the correct definition of the underlying database model or schema are critical to a business. TerminusDB organizes data in an object structure to facilitate modeling a business and the real world generally.

Modeling an organization

Using a small organization as an example, use the steps below to model and define a schema for the organization and its elements - team, project, task, and employee.

Data modeling steps

Step 1. Identify the elements of the organization

Step 2. Identify the properties of each element

Step 3. Identify the relationships between elements

Element relationship modeling

For relational and graph databases, an entity or element relationship model is a good way of implementing these steps. This helps to identify the components of the schema - its elements, properties, and relationships.

Diagram: An element relationship model

Step 1. Identify the elements of the organization

Elements are similar to entities in relational database terminology.

Table: Elements of an organization

Element

Description

organization

The main organization.

team

The teams within the organization.

employee

The employee assigned to task.

project

The projects that a team creates.

task

The tasks of the project.

Step 2. Identify the properties of each element

Properties are similar to attributes in relational database terminology. A property is an item of data describing the element.

Table: The properties of elements

Element

Properties

organization

name, desc, start-date

team

name, desc, start-date

employee

name, date-of-birth, start-date, role

project

name, start-date, end-date, desc, status

task

name, start-date, end-date, desc, status

Step 3. Identify the relationships between elements

Relationships are the same in graph and relational database terminology. Relationships define the associations or interactions between elements.

Table: The relationship between elements

Element

Element

Relationship (phrasal verb)

Relationship description

organization

team

consists-of

An organization consists of teams

team

project

collaborates-on

A team collaborates-on projects

project

task

divided-into

A project is divided-into tasks

task

employee

assigned-to

A task is assigned-to an employee

Last updated