Data Models in DBMS
Data Models in DBMSData models in DBMS are used to define the structure and organization of data in a database.They provide a way to represent the relationships between different data entities and constraints on the data. On this page, we will learnt about types of data models in DBMS.
Types of Data Models in DBMS
- Hierarchical database model
- Relational model
- Network model
- Entity-relationship model
- Object-oriented database model
- Document model
- Entity-attribute-value model
- Star schema
Let us learn more about in detail –
Hierarchical database model
The Hierarchical model is inspired from tree based data structure format. Where in there is a single root node and other data is linked to the same and expands like a tree.
- A child node data may only have a single parent node
- For any parent node one to many relationship must be maintained.
Network model was made to overcome the drawbacks fo hierarchical model. This works more like a graph rather than a tree.
As the name suggests there is network based looped relationship between various data linked to one another.
- A child node may have more than one parent. ( As for Node – N6)
- There can be many to many relationships between data.
This was very much used before there was relational data model in practise. Since, there are various networks relationships. It was a very fast way to access any data.
This is modeled about break and related model, i.e. we break data into different components based on characteristics, in terms of entity and attributes.
Imagine an entity student, its various attributes maybe studentID, age, dateOfBirth etc etc. It may have a relationship with courses offered to the student, which further may have attributes like CourseID and credits.
We will learn more about ER Diagrams in detail in further posts of ours.
In short Entity Relationship model is based on –
- Entity – These are representation of a real world entities in code.
- Attributes – These are the characteristic properties of entities
- Relationship – Logical relationship between various entities involved in the Database creation.
- One to one
- One to many
- Many to one
- Many to many
This is the most used model and even with DBMS that we will studying in future posts it will be based upon the same. Relational model is a tabular 2 dimensional relationship between various related tables having atleast one common field.
This works around
Object-oriented database model
The increasing complexity of the code in the modern age, where we try to create real time scenerios. Specially in Artificial Intelligence, Machine learning or Image processing.
We need a database that can also represent the real work scenerios very clearly and hence it is solved by having an object oriented database model.
- An object is an abstraction of a real-world entity. More or less an object is a real world instance of an entity in Entity Relationship Model
- Attributes describe the properties of an object, i.e customerID or orderID maybe called as properties of the object or attributes as in entity relationship model
- As we use classes and inheritance in OOPs concept. The similar can be used here. Classes are a superior set of objects with similar characteristics right?
- Inheritance is highly used in such, thus also using network or hierarchical model as default inspirations
You don’t need to know much more than than this about this model. This is far too advanced and only used in top companies and is a proprietary information.
Get over 200+ course One Subscription
Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others