Data Models in DBMS
In this course, we will study about Data Models in DBMS and their types: entity-relationship, relational, object-oriented, object-relational, semi-structured.
Data models in the database management system
It is a logical frame or view in which data is stored. This model describes the relationship between different parts and also defines how data is processed and stored in the system.
There are various types of data models that are used for understanding the structures. They can be enlisted as follow:
- Relational data model
- Entity-relationship data model
- Object-oriented data model
- Semistructured data model
Relational data model
- This model designs the data in the form of tables that are rows and columns.
- Thus, a relational model uses tables for the representation of data and relationships.
Tables are also known as relations.
- The Relational Model is the most widely used.
- The data is maintained in a two-dimensional table.
- All the information or data is stored in the form of rows and columns.
- The basic structure of this model is the tables.
- In this model, the relationship between tables is maintained by storing a common field.
Advantages of the Relational Model
This model is much simpler compared to the network and hierarchical.
This model is easily scaled, we can add as many rows and columns we wish to.
Changes in database structure can be done without changing the way in which data is accessed and hence we can say that structural independence has been achieved.
Disadvantages of the Relational Model
This model requires more powerful hardware computers and data storage devices for hiding the complexities and making things easier for the user.
Because the relational model is very easy to design and use. So there is no need for the users to know how the data is stored in order to access it. This ease of design leads to the development of a poor database which will further result in slow down if the database grows.
- Entity-Relationship Model is a high-level data model diagram.
- In this model, representations of the real-world problem are done in the pictorial form to make it look easy for the stakeholders to understand.
- The model is made in such a way that it is very easy for the developers to understand the system by just looking at the ER diagram.
- ER diagrams are used as a visual tool for the representation of an ER Model.
- ER diagram also known as the ER model is used for representing the data logically.
- It fulfills the requirement of the conceptual design of the database.
- It is used to represent relationships between different entity sets.
- The ER diagram looks more like a flowchart. But, ER Diagram contains many specialized symbols and the meanings of the symbols make this model unique.
- ER-diagrams have meanings that should be thoroughly understood so that we can create correct diagrams.
Advantages of ER Model
Conceptually ER Models are easy to build. By just knowing the relationship between the attributes and the entities one can easily build the ER Diagram for the model.
Effective Communication Tool
This model is widely used by database designers for communicating.
Easy Conversion to any Model
This model maps well to the relational model and can be easily converted to a relational model by converting the ER model to the table. This model can easily be converted to any other model like the network model, hierarchical model, etc.
Disadvantages of ER Model
No industry standard for notation
No industry standard is available for developing an ER model. So one developer must use notations which can be easily understood by other developers.
Some data might be lost or hidden. There are chances that some details of information might be hidden as it is a high-level view.
- Object-oriented data models are used to represent the real-world problems.
- In this model, a single structure known as an object is used to store both the data and relationships.
- Audio, video, images, etc can be stored in the database which was earlier not possible in the relational model(we can but it is not advised to do so).
- Two are more objects are connected using links.
Advantages of the object-oriented model
New data types can be made from the existing ones.
Is capable of handling a large variety of data types.
It is more expressive as it has navigational access from the objects. Navigational access is used for handling parts explosion, recursive queries, and much more.
Supports longer duration
It uses a different approach to handle the types of long-duration transactions that are very common in many advanced database applications.
Disadvantages of the object-oriented model
Increase in functionality provided by the object-oriented model makes it difficult to use and there is an increase in cost.
Adequate security measures are not there.
Lack of universal data models
No universally agreed data model for the object-oriented data model.
Semi-structured data model
- Data has some structure and does not conform to the data model.
- Now the data can not be stored in the form of tables as in Databases.
- Tags and elements are also known as metadata are used to group data and to describe how the data is stored.
- Group of similar entities is created and are organized in a hierarchy.
- Entities of the same group may or may not have the common attributes or properties.
- Automation and management of data becomes difficult as it does not contains sufficient metadata.
- The difference in size and type of the same attributes may occur in a group.
- Lack of a well-defined structure makes it difficult to be used by computer programs.
Advantages of the semi-structured data model
Schema can be easily changed.
Supports users who are not able to express their needs in SQL.
Data is portable.
Disadvantages of the semi-structured data model
Lack of fixed rigid schema leads to problems in the storage of data.
Queries are less efficient than structured data.
Cost is high.