Skip to content

Latest commit

 

History

History
68 lines (42 loc) · 4.39 KB

File metadata and controls

68 lines (42 loc) · 4.39 KB
description
An introduction to data modeling and modeling terminology common to relational and graph databases.

Data Modeling Basics

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

{% hint style="info" %} Elements are similar to entities in relational database terminology. {% endhint %}

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

{% hint style="info" %} Properties are similar to attributes in relational database terminology. A property is an item of data describing the element. {% endhint %}

Table: The properties of elements

ElementProperties
organizationname, desc, start-date
teamname, desc, start-date
employeename, date-of-birth, start-date, role
projectname, start-date, end-date, desc, status
taskname, start-date, end-date, desc, status

Step 3. Identify the relationships between elements

{% hint style="info" %} Relationships are the same in graph and relational database terminology. Relationships define the associations or interactions between elements. {% endhint %}

Table: The relationship between elements

ElementElementRelationship (phrasal verb)Relationship description
organizationteamconsists-ofAn organization consists of teams
teamprojectcollaborates-onA team collaborates-on projects
projecttaskdivided-intoA project is divided-into tasks
taskemployeeassigned-toA task is assigned-to an employee