Data Models/Database Models and their Types

Posted on Aug 18 2017 - 5:25pm by admin

Data Models

Underlying structure of the database is called as data model. It is a collection of conceptual tools for describing data, data relationships, data semantics and consistency constraints. Data models define how data is connected to each other and how they are processed and stored inside the system.

Types of data models are:

  1. Entity relationship model
  2. Relational model
  3. Hierarchical model
  4. Network model
  5. Object oriented model
  6. Object relational model

1. Entity Relationship Model

The entity relationship (E-R) model consists of a collection of basic objects, called entities and of relationships among these entities.

Entity

An entity can be real world object, either animate or inanimate, that can be easily identifiable. For example, in a school database, students, teachers, classes and courses offered can be considered as entities. Entities are represented by means of rectangles.

Relationship

A relationship is an association among several entities. For example an employee works at a department, a student enrolls in a course. Here, works at and enrolls are called relationship. Relationships are represented by diamond-shaped box.

Attributes

Entities are represented by means of their properties, called attributes. All attributes have values. For example, a student entity may have name, class, and age as attributes. Attributes are represented by means of ellipses. Every ellipse represents one attribute and is directly connected to its entity (rectangle).

The ER Model can be diagrammatically represented as follows:

Example of ER model

Let us consider an ER model for Banking system consisting of customers and accounts. The diagram shown below indicates that there are two entity sets, customer and account with attributes customer name, address, account no. and balance. In the diagram there is also a depositor between customer and account.

Advantages of ER model

  • The E-R model gives graphical and diagrammatic representation of various entities, their attributes and relationships between entities. So, It helps in the clear understanding of the data structure and in minimizing redundancy and other problems.
  • It is an effective communication tool among users, domain experts and database designers.
  • Conversion of ER Diagram to any other data model like network model, hierarchical model and the relational model is very easy.
  • ER model specifies mapping cardinalities.

Disadvantages

  • It is just used for database design and not for implementation.
  • There is no industry standard notation for developing ER diagram.
  • The E-R data model is especially popular for high level design.
  • No representation of data manipulation.
  • Physical design derived from E-R Model may have some amount of ambiguities or inconsistency.

2. Relational Model

The relational database was invented by E. F. Codd at IBM in 1970.The relational model represents data and relationships among data by a collection of tables, each of which has a number of columns with unique names. Relational data model is used widely around the world for data storage and processing. This model is simple and it has all the properties and capabilities required to process data with storage efficiency.

For example the following figure shows a relational database showing customers and their accounts. The customer Nina has two accounts with Rs. 50000 and 30000 balance.

Table Name: Customer

        Name Street City Account Number

Neena

Tagore Garden Delhi

101

Neena

Tagore Garden Delhi

201

Jacqueline

Janakpuri Delhi

402

Peter Connaught Place Delhi

506

Table Name : Account info

Account Number

Balance

101

       50000

201

30000

402

150000

506

80000

Advantages

  • The revision of any information as tables consisting of rows and columns is much easier to understand.
  • In rational database, changes in the database structure do not affect the data access. So relational database has structural independence.
  • The relational database model achieves both data independence and structural  independence making the database design, maintenance, administration and usage much easier that the other models.
  • It is simpler to navigate

Disadvantages

  • A major constraint and therefore disadvantage in the use of relational database system is machine performance. If the number of tables between which relationships to be established are large and the tables themselves effect the performance in responding to the sql queries.
  • Slower processing times than hierarchical and network models.

Pages: 1 2 3
About the Author

1 Comment so far. Feel free to join this conversation.

  1. furtdso linopv August 9, 2018 at 6:39 am - Reply

    I really enjoy reading through on this web site, it contains fantastic content.

Leave A Response