In this course, we will study Data Model in DBMS (Database Management System) and its types: entity-relationship, relational, object-oriented, object-relational, and semi-structured.
What is Data model in DBMS (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 in DBMS that are used for understanding the structures. They can be enlisted as follow:
- The relational data model in DBMS
- The entity-relationship data model in DBMS
- The object-oriented data model in DBMS
- The semistructured data model in DBMS
Relational data model in DBMS
- 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 data model in DBMS
This model is much simpler compared to the network and hierarchy.
This model is easily scaled, we can add as many rows and columns as we wish.
Changes in database structure can be done without changing how data is accessed; hence, we can say that structural independence has been achieved.
Disadvantages of the Relational data model in DBMS
This model requires more powerful hardware computers and data storage devices to hide the complexities and make 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 a slowdown if the database grows.
Entity-relationship data model in DBMS
- Entity-Relationship Model is a high-level data model diagram.
- In this model, representations of the real-world problem are done in pictorial form to make it look easy for the stakeholders to understand.
- The model is made so 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 fulfils 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 data model in DBMS
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 data model in DBMS
No industry standard for notation
No industry standard is available for developing an ER model. So one developer must use notations that 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 Model in DBMS
- Object-oriented data models are used to represent 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 data model in DBMS
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 data model in DBMS
An 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-on data model for the object-oriented data model.
Semi-structured data model in DBMS
- 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 also known as metadata are used to group data and to describe how the data is stored.
- A Group of similar entities is created and organized in a hierarchy.
- Entities of the same group may or may not have common attributes or properties.
- Automation and management of data become difficult as it does not contain sufficient metadata.
- The difference in size and type of the same attributes may occur in a group.
- The lack of a well-defined structure makes it difficult to be used computer programs.
Advantages of the semi-structured data model in DBMS
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 in DBMS
The lack of a fixed rigid schema leads to problems in the storage of data.
Queries are less efficient than structured data.
The cost is high.