Skip to content

Data Model II: Types of Data Modelling – SS2 Data Processing Lesson Note (First Term)

Lesson note at a glance

Class
SS2
Subject
Data Processing
Term
First Term
Reading time
5 min
Start of this note, 4 of 8
Take this term’s notes offline
Reading here is free. Download all 8 SS2 Data Processing First term notes as PDF to print and Word to edit.
Download all three terms, ₦2,000
Instant download. Secure payment by Paystack. Card, bank transfer, USSD or OPay. Payment stuck? WhatsApp us.

A data model is the way a database organises its data and the links between the data.

Behavioural objectives

By the end of the lesson, students should be able to:

Advertisement
  1. name the six types of data modelling;
  2. describe the flat, hierarchical and network models;
  3. explain the relational and object-relational models;
  4. state what a star schema is and what it consists of;
  5. compare the models using a simple school example.

What are the types of data modelling?

There are six types of data modelling: the flat model, hierarchical model, network model, relational model, object-relational model and star schema.

  • Flat model: data sits in a single table.
  • Hierarchical model: data is arranged in a tree.
  • Network model: records are linked by sets.
  • Relational model: data is held in tables linked by keys.
  • Object-relational model: a relational database that also supports objects.
  • Star schema: fact tables linked to dimension tables.

What is the flat model?

The flat model (or table model) is a single, two-dimensional array of data elements.

  • Columns: all members of a given column are assumed to be similar in values.
  • Rows: all members of a row are assumed to be related to one another.
  • Example: one table holding a school register with name, class, age and address.
  • Strength: it is simple to set up and read.
  • Weakness: the same data may be repeated many times in the table.

What is the hierarchical model?

The hierarchical model organises data into an upside-down, tree-like structure.

  • Single parent link: each record has a single upward link to describe the nesting.
  • Sort field: it keeps the records in a particular order in each same-level list.
  • Use: hierarchical structures were widely used in the early mainframe database management systems.
  • Example: a school has many classes, and each class has many students.
  • Weakness: a record cannot easily have more than one parent.

Diagram of a hierarchical data model

What is the network model?

The network model organises data using two fundamental constructs, called records and sets.

  • Records: they contain fields.
  • Sets: they define one-to-many relationships between records: one owner, and many members.
  • Many links: a record can belong to more than one set, so it can have more than one owner.
  • Example: a student record linked to several teacher records, and each teacher linked to many students.
  • Weakness: the many links make the structure harder to design and manage.
Advertisement

Diagram of a network data model

What is the relational model?

The relational model is a database model based on first-order predicate logic, in which data is stored in tables.

  • Core idea: it describes a database as a collection of predicates over a finite set of predicate variables.
  • Constraints: these describe the possible values and combinations of values.
  • Table (relation): a set of rows and columns holding data about one subject.
  • Row (record): one complete entry, such as one student.
  • Column (field): one item of information, such as surname.
  • Primary key: a field that identifies each row, such as admission number.
  • Foreign key: a field that links one table to another table’s primary key.
  • Example: a Students table and a Subjects table linked by admission number.

What is the object-relational model?

The object-relational model is similar to the relational model, but it directly supports objects, classes and inheritance.

  • Where supported: in the database schemas and in the query language.
  • Middle ground: it sits between relational databases and object-oriented databases (OODBMS).
  • What it keeps: tables, rows and columns from the relational model.
  • What it adds: objects, classes and inheritance.

What is a star schema?

The star schema is the simplest style of data warehouse schema.

  • Fact tables: a few tables (possibly only one, justifying the name) that hold the measurable figures, such as amount sold.
  • Dimension tables: any number of tables that the fact table references, such as product, date, store and customer.
  • Shape: the fact table sits at the centre and the dimension tables surround it like the points of a star.
  • Link to snowflake: the star schema is considered an important special case of the snowflake schema.
Sales fact Product Date Customer Store
A star schema: one fact table linked to four dimension tables. Based on standard data warehouse texts.

How do the six data models compare?

The table below shows how each model arranges data.

Advertisement
Model How data is arranged Simple example
Flat One two-dimensional table A school register
Hierarchical Upside-down tree, one parent per record School, classes, students
Network Records linked by sets, one owner and many members Students linked to teachers
Relational Tables linked by keys Students and Subjects tables
Object-relational Relational tables plus objects, classes and inheritance A relational database with object support
Star schema Fact table linked to dimension tables Sales fact with product and date tables

What is the difference between the hierarchical and network models?

The hierarchical model arranges records in a tree where each record has one parent.

The network model links records through sets, so a record can belong to more than one set.

Point Hierarchical model Network model
Structure Tree Records and sets
Owners of a record One parent only One or more owners
Relationship One-to-many One-to-many sets that can combine into many-to-many links
Complexity Simpler More complex

Evaluation

  1. List the six types of data modelling.
  2. Describe how data is arranged in a flat model.
  3. In the network model, what are records and sets?
  4. How is the object-relational model similar to the relational model, and what does it add?
  5. What does a star schema consist of?

Assignment

Explain the hierarchical model and the network model in your own words. State one difference between them.

This term's Data Processing topics

SS2 First Term · 8 topics

  1. Database Management System I
  2. Database Management System II: How to Create Database
  3. Data Model
  4. Data Model II: Types of Data Modelling
  5. Data Modeling
  6. Data Modeling II: Standard Data Model & Examples
  7. Normalization
  8. Entity-Relationship Models
Advertisement

Lesson Notes for Other Classes

Print it or edit it in Word

Every note is free to read online. A PDF or Word copy of one subject costs ₦1,000 for one term, or ₦2,000 for all three terms.

Sign in first, then choose your class and subject at checkout.