Data Model In Database Management Systems

CSEBLOG100
0
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.

Different types of data models are Entity relationship model, Relational model, Hierarchical model, Network model, Object oriental model and Object relational model.

Entity Relationship model:

The Entity relationship model consists of a collection of basic objects called entities and of relationships among these entities.

Entity: An entity is a thing or object in the real world that is distinguishable from other objects. For example each person is an entity and bank accounts is an entity. Entities are described in a database by a set of attributes. For example the attributes of account entity are account entity are account_no and balance.

Relationship: A relationship is an association among several entities. For example a depositor relationship associates a customer with each account that she has. The set of all entities of same type and the set of all relationships of the same type are termed as an entity set and relationship set respectively.

The overall logical structure of a database can be expressed graphically by an E-R diagram which consists of following components:

Rectangles which represent entity sets. Ellipses which represent attributes, Diamonds which represent relationships among entity sets, Lines which link attributes to entity sets and entity sets to relationships.

E-R diagram for banking system consisting of customers and accounts. The E-R diagram indicates that there are two entity sets customer and account with attributes customer _ id , customer _ name , customer _ address of entity set customer and attributes account _ no , balance of entity set account. The diagram also shows a relationship depositor between customer and account.

In addition to entities and relationships the E-R model also represents certain constraints to which the contents of a database must conform. One important constraint is mapping  which express the number of entities to which another entity can be associated via a relationship set. For example if each account must belong to only one customer the E-R model can express that constraint. The entity relationship model is widely used in database design.

Advantages:

It is easy to develop relational model using E-R model. E-R model specifies mapping. It specifies keys like primary key. We can specify generalization and specialization using E-R diagram.

Disadvantage:

It is just used for database design not for implementation.

Relational Model:

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.

Advantages: The major advantages of the relational model are:

Structural independence: When is is possible to make change to the database structure without affecting the DBMS capability to access data we can say that structure independence have been achieved. In relational database changes in the database change in the database structure do not affect the data access. So relational database has structural independence.

Conceptual simplicity: The relational database model is simpler at the conceptual level. Since the relational data model frees the designer from the physical data storage detail the designers can concentrate on the logical view of the database.

Design, Implementation, maintenance and usage ease: 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 and greater flexibility.

Disadvantages:

Significant hardware and software overheads. Not as good for transaction process modeling as hierarchical and network models. May have slower processing times than hierarchical and network models.

Hierarchical model:

A hierarchical database is a king of database management system that links records together in a tree data structure such that each record type has only one owner. For example an order is owned by only one customer.

Hierarchical structures were widely used in the first main frame database management systems.

Advantages:
  • High speed of access to large data sets.
  • Ease of updates.
  • Simplicity: The design of a hierarchical database is simple.
  • Data security: Hierarchical model was the first database model that offered the data security that is provided and enforced by the DBMS.
  • Efficiency: The hierarchical database model is a very efficient one when the database contains a large number of 1 : n relationships and when the users require large number of transactions using data whose relationships are fixed.
Disadvantages:
  • Implementation complexity: Although the hierarchical database model is conceptually simple and easy to design it is quite complex to implement.
  • Database management problem: If you make any changes in the database structure of a hierarchical database then you need to make the necessary changes in all the application programs that access the database. Thus maintaining the database and the applications can become very difficult.
  • Lack of structural independence: Hierarchical database system use physical storage paths to navigate to the different data segments. So if the physical structure is changed the applications will also have to be modified. Thus in a hierarchical database the benefits of data independence is limited by structural dependence.
Linkages are only possible vertically but not horizontally or diagonally that is there is no relation between different trees at the same level unless they share the same parent.
 
Network Model:
 
The network model is based on directed graph theory. The network model replaces the hierarchical tree with a graph thus allowing more general connections among the nodes. The main difference of the network model from the hierarchical model is its ability to handle many-to-many (n : n) relationships or in other words it allows a record to have more than one parent. Example is an employee working for two departments.
 
Advantages:
 
Conceptual simplicity: Just like the hierarchical model the network model is also conceptually simple and easy to design.
 
Capability to handle more relationship types: The network model can handle the one to many 1 : n and many to many n : n relationships.

Data independence: The changes in data characteristics do not require changes to the application programs.

Disadvantages:

Detailed Structural knowledge is required. Lack of structural independence.

Object oriented Model:

The object oriental model is based on a collection of objects. An object contains values stored in instance variables within the object. These bodies of code are called methods. Objects that contain the same types of values and the same methods are grouped together into classes.
 
Advantages:
 
Application require less code. Applications use more natural data model. Code is easier to maintain. It provides higher performance management of objects and complex inter-relationships between objects. Object oriented features improve productivity. Data access is easy.
 
Object Relational Model:
 
A  system that includes both object infrastructure and a set of relational extenders is called an object relational model. Object relational systems combine the advantages of modern object oriented programming languages with relational database features such as multiple views of data and a high level non procedural query language. Some of the object relational systems available in the market are IBM's DB2 universal server, oracle corporations oracle 8, Microsoft corporations SQL server 7 and so on.

Post a Comment

0Comments

Post Your comments,Views and thoughts Here, Give Us Time To Respond Your Queries

Post a Comment (0)