+1 vote
in Class 12 by kratos

Explain database model.

1 Answer

+3 votes
by kratos
 
Best answer

Database models are broadly classified into two categories.

They are:

  • Object-based logical models
  • Record-based logical models

The object-based logical model can be defined as a collection of conceptual tools for describing data, data relationships, and data constraints.

The record-based model describes the data structures and access techniques of a DBMS. There are three types of record-based logical models. They are the hierarchical model, the network model, and the relational model.

Consider the example of a company. There are many employees who work in various departments earning a different salary. EMPLOYEE, DEPARTMENT, SALARY represents the entities about which data has to be recorded. It would be really meaningless if the data just exists in the database.

Hence it is necessary that these data should be related to each other. Therefore a database should maintain information about these data and relationships.

Hierarchical Database Systems (HDS):

Consider the tree diagram as given below.

This can be said to have a parent-child relationship. The orgin of a data tree is the root. Data located at different levels along a particular branch from the root is called the node.

The last node in the series is called the leaf. This model supports a One-to-Many relationship. Each child has pointers to numerous siblings and there is just one pointer to the parent thus proving a One-to-Many relationship.

Drawbacks:

It is not possible to insert a new level in the table without altering the structure. Suppose a new level is required between the root and the department, the only alternative is to frame an entirely new structure.

To set this relationship, multiple copies of the same data must be stored at multiple levels that could cause redundancy of data. To overcome this drawback, the Network Database Model was introduced.

Network Database Systems (NDS):

This model comes under Record-based logical model. The main idea behind this model is to bring about a Many-to-Many relationship. The relationship between the different data items is called as the sets. This system also uses a pointer to locate a particular record. Let us consider the item - vendor example as shown.

If one has to know which vendor(*) is selling a particular item or which particular item the vendor sells, it is completely dependent on the pointer to map out the relationship. But even here in case of large volumes of data, it is very difficult to locate the item because it will increase the complexity as it uses pointers, the mapping of data would become very difficult.

Since all the models use pointers it increases complexity. To overcome all the drawbacks the idea of a Relational Database System came up.

Relational Database Model:
Dr. E.F.Codd first introduced the Relational Database Model in 1970. This model allows data to be represented in a ‘simple row-column format’. Each data field is considered as a column and each record is considered as a row of a table. Different relationships between the various tables are achieved by mathematical set functions namely JOIN and UNION.

...