Types of Database Models- Explained with Examples

Types of Database Models- Explained with Examples





Introduction

A database system is a collection of related data along with programs that help users access, manage, and modify that data easily.

The main goal of database system is to give users a simple and clear view of the data by hides how the data is actually stored and maintained internally i.e., the complex details. Here, the data model are used, these will be discussed in detail in the following section.


Data Models

The structure of a database is based on something called a data model.

A data model is a set of concepts used to describe:
  • how data is organized,
  • how different data items are related,
  • the meaning of data,
  • rules to maintain data consistency.
There are different types of data models, and they are generally classified into four main categories.

Types of Database Models

There are four main types:
  1. Hierarchical Model
  2. Network Model
  3. Relational Model
  4. Object-Oriented Model

1. Hierarchical Model

In hierarchical model, data is organized in a tree-like structure. Each record holds data and links to subordinate nodes from the parent node to its children. A parent or record can have one or more child i.e., it is in the form of one-to-many relationship. But each child has only one parent. It has a simple structure. Real-Life example is organization structure, file directory system, etc.

Example:

Company
├── HR Department
├── IT Department
└── Sales Department

2. Network Model

Data is organized like a graph, Where a child can have multiple parents. It is in the form of many to many relationship. Network model is more flexible than hierarchical. In real-life, we can see it in social networks, Course enrollment system etc.

Example
A student can enroll in multiple courses:
student < - > course

3.  Relational Model

In relational model, data is stored in tables, where column is a vertical group of cell with a data type . and horizonal group of cell where a particular person data is stored as per the label are rows. It is easy to understand therefore are widely used. SQL uses relational model. In real-life, banking systems, E-commerce websites, college database, etc.

Each table is called a relation.

Example:



4. Object-Oriented Model

Data is stored as objects, similar to object-oriented programming. This is mostly used in understanding concepts of programming language like Java, C, C++, Python etc. Supports complex data . It combines data and methods. In real life, It is used in  Multimedia systems , Advanced application, etc.

Comparison Table




Practice Questions 

  1. What is a database model?
  2. Explain hierarchical model with example.
  3. Difference between network and hierarchical model.
  4. Why is relational model most popular?
  5. What is object-oriented model?






 

Comments

Popular posts from this blog

Python Input and Output(input() & print())

Python Conditional Statements(if, elif, else)

Introduction To Database Management System