Sun 19 May 2024
Baydari.com

How many Types of Data Models

Types of Data Models


Different types of data models are as follows:

  1. Object-Based Data Models
  2.  Record-Based Models
  3. Physical Data Models

Object-based data models and record-based data models are used to describe data at conceptual and external levels. The physical data models are used to describe data at an internal level.

 

Object-Based Data Models

Object-based data models use the concepts like entities, attributes, and relationships.  an entity is a person, place, thing, or event for which data is collected and maintained in the database. An attribute is the characteristic of an entity. A relationship is an association between two or more entities. Some types of object-based data models are as follows:

  1. Entity-Relationship In
  2. Semantic
  3. Object-Oriented etc.

 

Record-Based Data Models

Record-based models are basically used to describe external and conceptual levels of databases. They can also be used to describe the internal level to some extent. They are used to develop and specify the logical structure and provide some options for the implementation of the design. In record-based data models, the database consists of different records. The records may be of different types. Each record type defines a fixed number of fields.
There are three types of record-based data models:

  1. The Hierarchical Model
  2. The Network Model
  3. The Relational Model

 

Hierarchical Model

One of the earliest database management systems was based on a hierarchical model. In this model, records have a parent-child relationship. One of the most popular hierarchical database management systems was Information Management System (IMS). It was introduced by IBM in 1968. IMS is still the most widely used DBMS on IBM mainframes.
Consider the application used for Production Planning in automobile manufacturing companies. The model of the database is shown in the following figure. The automobile manufacturer produces various models of cars. Each car model is decomposed into assemblies like Engine, Body, and Chassis. Each assembly is further decomposed into sub-assemblies like valves, spark plugs, and so on. If the manufacturer wants to generate the Bill of Materials for
a particular model of an automobile, the hierarchical data model is suitable because the bill of materials for a product has a hierarchical structure. Each record represents a particular part. Since the records have a parent-child relationship, each part is linked to its sub-part.


Characteristics of Hierarchical Model

The characteristics of a hierarchical DBMS are as follows:


1. Representation of Data as Hierarchical Trees
The hierarchical database is characterized by parent-child relationships between records. A record type R1 is called the parent of record type R2 if R1 is one level higher than R2 in the hierarchical tree. The root of the hierarchy is the most important record type. All records at different levels of the hierarchy are dependent on the root.

2. Each Sub-Module has only one Super-Module
Each child record (sub-module) has only one parent record (super-module). The parent record can have one or more children's record types.


3. Represents a set of Related Records
There can be one or more record occurrences for a given record type. When the user writes into a database, only one occurrence of a record type is written. Similarly, when a record is retrieved from a database, only one occurrence of a record type is retrieved.


4. Hierarchy through Pointers
In a hierarchical database, pointers are used to link the records. Pointers determine whether a particular record occurrence is a parent or a child record. The path from the parent to the child is maintained through pointers.

5. Simple Structure
The database is a simple hierarchical tree. The parent and child records are stored close to each other on the disk. It minimizes disk input and output.


6. High Performance
The parent-child relationship is stored as pointers from one record to another. The navigation through the database is very fast resulting in high performance.


7. Predefined Relationships between Record Types
Record types at different levels of the hierarchy are dependent on the root. The root is the most important record type in the hierarchy.


8. Difficult to Reorganize
It is difficult to reorganize the database because the hierarchy has to be maintained. Each time a record type is inserted or deleted, the pointers have to be manipulated to maintain the parent-child relationship.

9. More Complex Real Life Requirements
The hierarchical DBMS is based on a simple parent-child relationship. The real-life applications are more complex and cannot be represented by a hierarchical structure. For example, in an order-processing database, a single order might participate in three different parent-child relationships. It may link the order to a customer who placed the order, the items ordered and the salesperson who took the order. This complex structure cannot be represented
in a hierarchical structure.
 


Share