Database Systems: Data Models

A data model is a collection of concepts that can be used to describe the structure of the database including  data  types, relationships  and  the  constraints that  apply  on the  data.

A data model helps in understanding the meaning of the data and ensures that, we understand.

  • The data requirements of each
  • The use of data across  various
  • The nature of data independent of its physical

A data model supports communication between the users and database designers. The major use of data model is to understand the meaning of the data and to facilitate communication about the  user  requirements.

Characteristics of Data Models

A data model must posses the following characteristics so that the best possible data representation can  be  obtained.

  1. Diagrammatic representation of the data
  2. Simplicity in designing e., Data and their relationships can be expressed and distinguished easily.
  3. Application independent, so that different applications can share
  4. Data representation must be without
  5. Bottom-up approach must be
  6. Consistency and structure validation must be

1. Types of Data Models

The various  data  models can  be  divided into  three  categories, such  as

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

 

  • Record Based Data Models : These models represent data by using the record These models lie between the object based data models and the physical data models. These  data  models can  be  further  categorised  into three  types:
    • Hierarchical Data Model
    • Network Data Model
    • Relational Data Model.
  • Object Based Data Models : These models are used in describing the data at the logical and user view These models allow the users to implicity specify the constraints in the data. These data models can be further categorised into four types:
    • Entity Relationship Model (ER-Model)
    • Object Oriented Model
    • Semantic Data Model
    • Functional Data Model.

The models  are discussed  in the  coming sections.

  • Physical Data Models : These models provide the concepts that describes the details of how the data is stored in the computer along with their record structures, access paths and Only specialized or professional users can use these models. These data models can be divided into two types:
    • Unifying Model
    • Frame Memory Model.

1.1.  Record based Data Models

Record based data models represent data by using the record structures. These are used to describe data at the conceptual view level. These are named because the database is structured in a fixed format records of several types. The use of fixed length records simplify the physical level implementation of the database. These models lie between the object based data models and the physical data models. These models provide the concepts that may be understood by the end users. These data models do not implement the full detail of the data storage on a computer system. Thus, these models are used to specify overall logical structure of the database and to provide high level description of implementation. These are generally used in traditional DBMS’s and are also known as ‘Representational Data Models’. The various  categories of  record  based data  models  are as  follows:

  • Hierarchical Data Model
  • Network Data Model
  • Relational Data

 

  • Hierarchical Data Model : Hierarchical Data Model is one of the oldest database The hierarchical model became popular with the introduction of IBM’s Information Management System (IMS).

The hierarchical data model organizes records in a tree structure i.e., hierarchy of parent and child records relationships. This model employs two main concepts : Record and Parent Child Relationship. A record is a collection of field values that provide information of an entity.

A Parent Child Relationship type is a 1 : N relationship between two record types. The record type of one side is called the parent record type and the one on the N side is called the child record type. In terms of tree data structure, a record type corresponds to node of a tree  and relationship  type corresponds  to  edge of  the tree.

The model requires that each child record can be linked to only one parent and child can only  be  reached  through its  parent.

In the Figure 1.8, the ‘WORLD’ acts as a root of the tree structure which has many children’s like Asia, Europe, Australia etc. These children can act as a parent for different countries such as ASIA continents acts as a parent for countries like India, China, Pakistan etc. Similarly these children can act as a parent for different states such as INDIA country acts as  a  parent  for states  Punjab,  Haryana,  Rajasthan  etc. Further  the  same  follows.

Consider child ‘ROHTAk’ which has a parent ‘HARYANA’ which further has a parent ‘INDIA’ and so on. Now ‘India’ will acts a grandparent for the child ‘ROHTAK’.

The major advantages of Hierarchical Model are that it is simple, efficient, maintains data integrity and is the first model that provides the concept of data security. The major disadvantages of Hierarchical model are that it is complex to implement, Lacking of structural independence, operational  anomalies  and  data  management  problem.

  • Network Data Model : As a result of limitations in the hierarchical model, designers developed the Network The ability of this model to handle many to many (N : N) relations between its records is the main distinguishing feature from the hierarchical model. Thus, this model permits a child record to have more than one parent. In this model, directed graphs are used instead of tree structure in which a node can have more than one parent. This model was  basically designed  to  handle non-hierarchical  relationships.

The relationships between specific records of 1 : 1 (one to one), 1 : N (one to many) or N : N  (many to  many) are  explicitly defined  in database  definition of  this model.

The Network Model was standardized as the CODASYL DBTG (Conference of Data System Languages, Database  Task Group)  model.

There are two basic data structures in this model—Records and Sets. The record contains the detailed information regarding the data which are classified into record types. A set type represents relationship between record types and this model use linked lists to represent these relationships. Each set type definition consists of three basic elements : a name for set type an owner record type  (like parent) and a  member record type  (like child).

To represent many to many relationship in this model, the relationship is decomposed into two one to many (1 : N) relationships by introducing an additional record type called an Intersection  Record  or  Connection  Record.

The major advantages of Network Model are that it is conceptually simple, Handles more relationship types, promotes database integrity, data access flexibility and conformance to the  standards.

The major disadvantages of Network Model are that it is complex and lack of structural independence.

  • Relational data Model : The Relational Model was first introduced by Edgar Frank, an Oxford-trained Mathematician, while working in IBM Research Centre in 1970’s.

The Relational Model is considered one of the most popular developments in the database technology because it can be used for representing most of the real world objects and the relationships between  them.

The main significance of the model is the absolute separation of the logical view and the physical view of the data. The physical view in relational model is implementation dependent and not  further  defined.

The logical view of data in relational model is set oriented. A relational set is an unordered group of items. The field in the items are the columns. The column in a table have names.

The rows are unordered and unnamed. A database consists of one or more tables plus a catalogue describing the database.

The relational model consists of three components:

  1. A structural component—A set of tables (also called relations) and set of domains that defines the  way data  can  be represented.
  2. A set of  rules  for  maintaining the  integrity  of  the database.
  3. A manipulative component consisting of a set of high-level operations which act upon and produce  whole tables.

In the relational model the data is represented in the form of tables which is used interchangeably with the word Relation. Each table consists of rows also knowns as tuples (A tuple represents a collection of information about an item, e.g., student record) and column also known as attributes. (An attribute represents the characteristics of an item, e.g., Student’s Name and Phone No.). There are relationships existing between different tables. This model doesn’t require any information that specifies how the data should be stored physically.

The major advantages of Relational Model are that it is structurally independent, improved conceptual simplicity adhoc query capability and powerful DBMS. The major disadvantages of relational model are substantial hardware and software overhead and facilitates poor design and implementation.

1.2. Object Based Data Models

Object Based Data Models are also known as conceptual models used for defining concepts including entries, attributes and relationships between them. These models are used in describing data at the logical and user view levels. These models allow the constraints to be  specified  on  the  data  explicitly  by  the  users.

An entity is a distinct object which has existence in real world. It will be implemented as a table in a database.

An attribute is the property of an entity, in other words, attribute is a single atomic unit of information that describes something about its entity. It will be implemented as a column or field  in  the  database.

The associations or links between the various entities is known as relationships.

There are  4 types  of  object based  data models.  These  are:

  1. Entity-relationship (E-R) Model
  2. Object-Oriented Model
  3. Semantic Data Model
  4. Functional Data Model These are discussed as follows:

(a) Entity-Relationship (E-R) Model : The E-R model is a high level conceptual data model developed by Chen in 1976 to facilitate database The E-R model is the generalization of earlier available commercial model like the hierarchical and network model. It also allows the representation of the  various constraints  as well  as their  relationships.

The relationship between entity sets is represented by a name. E-R relationship is of 1 : 1, 1 : N or N : N type which tells the  mapping from one entity set to another.

E-R model is shown diagrammatically using entity-relationship (E-R) diagrams which represents the elements of the conceptual model that show the meanings and relationships between those elements independent of any particular DBMS. The various features of E-R model are:

  1. E-R Model can be  easily converted  into relations  (tables).
  2. E-R Model is used for purpose of good database design by database developer.
  3. It is helpful as a problem decomposition tool as it shows entities and the relationship between those entities.
  4. It is an iterative process.
  5. It is very simple and easy to understand by various types of users.

The major advantages of E-R model are that it is conceptually simple, have vishal representation, an effective communication tool and can be integrated with the relational data model.

The major disadvantages of E-R model are that there are limited constraint representation, limited relationship representation, no data manipulation language and loss of information content.

(b) Object-Oriented Data Model : Object-oriented data model is a logical data model that captures the semantics of objects supported in an object-oriented It is based on collection of objects, attributes and relationships which together form the static properties. It also consists of the integrity rules over objects and dynamic properties such as operations or rules defining  new  database  states.

An object is a collection of data and methods. When different objects of same type are grouped together they form a class. This model is used basically for multimedia applications as well as data with complex relationships. The object model is represented graphically with object diagrams containing object classes. Classes are arranged into hierarchies sharing common structure  and behaviour  and  are associated  with  other classes.

Advantages of Object-Oriented Data Models

The various  advantages of  object-oriented  data model  are as  follows:

  1. Capability to handle various data types : The object-oriented databases has the capability to store various  types of  data such  as text,  video pictures,  voices
  2. Improved data access : Object oriented data models represent relationships explicitly. This improves the  data
  3. Improved productivity : Object-oriented data models provide various features such as inheritance, polymorphism and dynamic binding that allow the users to compose These features increase the productivity of the database developer.
  4. Integrated application development system : Object-oriented data model is capable of combining object-oriented programming with database technology which provides an integrated application development

3. Disadvantages of Object-Oriented Data Models

The various  disadvantages of  object-oriented  data models  are as  follows:

  • Not suitable for all applications : Object-oriented data models are used where there is a need to manage complex relationships among data They are generally suited for applications such as e-commerce, engineering and science etc. and not for all applications.
  • No precise definition : It is difficult to define what constitutes an object-oriented DBMS since the  name  has  been applicable  to  wide  variety  of  products.
  • Difficult to maintain : The definition of object is required to be changed periodically and migration of existing databases to confirm to the new object definition. It creates problems when changing object  definitions  and migrating databases.
  • Semantic Data Models : These models are used to express greater interdependencies among entities of These interdependencies enable the models to represent the semantic of the data in the database. This class of data models are influenced by the work done by artificial intelligence researchers. Semantic data models are developed to organize and represent knowledge but not data. This type of data models are able to express greater interdependencies among entities of interest. Mainframe database are increasingly adopting semantic data models. Also, its growth usage is seen in PC’s. In coming times database management systems will be partially or fully intelligent.
  • Functional Data Model : The functional data model describes those aspects of a system concerned with transformation of values-functions, mappings, constraints and functional The functional data model describes the computations within a system. It shows how output value in computation are derived from input values without regard for the order in which the values are computed. It also includes constraints among values. It consists of multiple data flow diagrams. Data flow diagrams show the dependencies between values and computation of output values from input values and functions, without regard for when the functions are executed. Traditional computing concepts such as expression trees are examples of  functional  models.

2. Comparison of Various Data Models

The most commonly used data models are compared on the basis of various properties. The comparison table  is  given below.

3. Which Data Models to Use?

So far we have discussed a large number of data models. Data models are essential as they provide access techniques and data structure for defining a DBMS. In other words, a data model describe the logical Organization of data along with operations that manipulate the data.

We have large number of data models, the one which is best for the Organization depends upon the following factors:

  • Is the database too small or too
  • What are the costs
  • The volume of daily transactions that will be
  • The estimated number of queries that will be made from the database by the organization to enquire about  the
  • The data requirements of the organization using

From the available record based data models, the relational data model is most commonly used model  by  most of  the  organizations because  of  the  following reasons:

  1. It increases the productivity of application programmers in designing the Whenever changes are made to the database there is no need of changing the application programs because of separation of  logical level from conceptual level.
  2. It is useful for representing most of the real world objects and relationships between
  3. It provides very powerful search, selection and maintenance of
  4. It hides the physical level details from the end users so end users are not bothered by physical
  5. It provides data integrity and security so that data is not accessed by unauthorized users and data is always
  6. It provides adhoc query

Some of the common DBMS using Relational model are MS-Access, Informix, Ingres, Oracle etc.

The hierarchical data model is used in those organizations which use databases consisting of large number of one to many relationships. Because of the restriction to one to many relationships, complexity of tree structure diagrams, lack of declarative querying facilities the hierarchical model  lost  its  importance.

The network data model is used in those organizations which use databases consisting of large number of many to many relationships, but due to its complex nature it is also not preferred.

Most of the DBMS use object oriented data modelling techniques which are used by large number of organizations. For example—Latest versions of oracle are object relational hybrids because  they  support both  relational  and Object  Oriented  features.

Source: Gupta Satinder Bal, Mittal Aditya (2017), Introduction to Database Management System, 2nd Edition-University Science Press (2017)

Leave a Reply

Your email address will not be published. Required fields are marked *