Do you know what DBMS is? Do you know how DBMS is used for managing data simultaneously? A Database Management System (DBMS) is a software application that allows users to manage and organize data efficiently. DBMS systems come in various types, each designed to handle different data models and provide specific functionalities.
In this article, we will discuss the various types of DBMS or (Database Management System).
What is DBMS?
DBMS stands for Database Management System. DBMS's full form itself states that it is a system that helps in managing the database. A Database is a collection of data records, mainly in the form of tables, that contain information. The database management system is a collection of programs that help in storing and retrieving data from the database. DBMS consists of programs that are helpful in manipulating databases.
Types of DBMS
Based on the data model, there are four types of DBMS.
Relational Database (RDBMS)
Object Oriented Database (OODBMS)
Hierarchical Database
Network Database
Let’s discuss them one by one.
1. Relational Database
The relational database management system is used to store data in two-dimensional tables using rows and columns. RDBMS is used in industries, and it is a very popular data model. In a database, every table has a key field which identifies each record uniquely. This key field is known as a primary key. We can make a whole column as a primary key which can be helpful in identifying or referencing any record easily in a table. A few examples of RDBMS are oracle database, MySql, and Microsoft SQL server. Let’s create a table to understand RDBMS more clearly. We can run our SQL programs on Oracle Live SQL.
Code
CREATE TABLE Student(
ROLL_NO INT PRIMARY KEY,
FULL_NAME VARCHAR(15),
AGE INT
)
Output
2. Object Oriented Database
The object-oriented database management system represents the data in the form of objects which is used in object-oriented programming. The OODBMS is based on object-oriented features, which include data encapsulation, inheritance and polymorphism. As compared to relational DBMS, OODBMS can store complex data because an object stores all the relationships that it has with other objects. Storing relationships with other objects is important because it allows users to see related data while viewing records.An object-oriented database is a combination of object-oriented programming and a relational database. A few examples of OODBMS are Versant object database, ObjectStore. See the below image to understand about object-oriented database more clearly.
Code
Python
Python
class Employee: def __init__(self, id, name, age): self.id = id self.name = name self.age = age
In the hierarchical database management system, the data is organized into a tree-like structure. We can also say that the data is stored in such a way that they are in one to many relationships with each other. The hierarchy starts with a root node that contains root data. Then child nodes are added to the root (parent) node and make a tree-like structure. A few examples of hierarchical databases are IMS(IBM) and Windows registry (Microsoft). See the below image to understand the hierarchical database more clearly.
In the above diagram, the hierarchy is started with the root node Company, and Managers, Developers, and Testers are three child nodes of the root Company. Node Developers again have three child nodes named, Name, Employee ID, and Project Name. On the whole, they make a tree-like structure.
Code
MYSQL
MYSQL
CREATE TABLE Employees ( EmployeeID int PRIMARY KEY, Name VARCHAR(50), ManagerID int, FOREIGN KEY (ManagerID) REFERENCES Employees(EmployeeID) );
WITH RECURSIVE EmployeeHierarchy AS ( SELECT EmployeeID, Name, ManagerID, 1 AS Level FROM Employees WHERE ManagerID IS NULL UNION ALL SELECT e.EmployeeID, e.Name, e.ManagerID, eh.Level + 1 FROM Employees e JOIN EmployeeHierarchy eh ON e.ManagerID = eh.EmployeeID ) SELECT CONCAT(REPEAT('--', Level - 1), Name) AS Team FROM EmployeeHierarchy ORDER BY EmployeeID;
You can also try this code with Online MySQL Compiler
In the network database management system, the data stored in the database maintains one-to-one or many-to-many relationships with each other. Network DBMS has a hierarchical structure too, but the data is stored in the database like a graph. A graph is a non-linear representation that consists of vertices and edges. In network DBMS, one child record can have more than one parent also. A few examples of network DBMS are Integrated Data Store (IDS) and IDMS (Integrated Database Management System). See the below image to understand the network database more clearly.
In the above network database, Company, Managers, Developers, Senior Project Manager, Project Manager, Java Developer, and Web Developer are vertices. And all the arrows shown are the edges. We can clearly see that one child record has more than one parent also. For example, Web Developer has two parents named, Senior Project Manager and Project Manager. So from this example, we can understand that managers can handle multiple developers; for example, the senior project manager can handle java and web developers.
Code
MySQL
MySQL
-- Create a table to store employees CREATE TABLE Employees ( EmployeeID INT PRIMARY KEY, Name VARCHAR(50) );
-- Create a table to store relationships (who reports to whom) CREATE TABLE EmployeeRelationships ( ReportingEmployeeID INT, ManagerEmployeeID INT, FOREIGN KEY (ReportingEmployeeID) REFERENCES Employees(EmployeeID), FOREIGN KEY (ManagerEmployeeID) REFERENCES Employees(EmployeeID) );
-- Insert sample data INSERT INTO Employees (EmployeeID, Name) VALUES (1, 'A'), (2, 'B'), (3, 'C'), (4, 'D'), (5, 'E');
INSERT INTO EmployeeRelationships (ReportingEmployeeID, ManagerEmployeeID) VALUES (2, 1), -- B reports to A (3, 1), -- C reports to A (4, 2), -- D reports to B (5, 2); -- E reports to B
-- Retrieve the reporting hierarchy SELECT E1.Name AS ReportingEmployee, E2.Name AS Manager FROM Employees E1 JOIN EmployeeRelationships R ON E1.EmployeeID = R.ReportingEmployeeID JOIN Employees E2 ON R.ManagerEmployeeID = E2.EmployeeID;
You can also try this code with Online MySQL Compiler
The advantages of database management systems are as follows:
Simplified data handling
With the help of DBMS, you can store the data in a synchronized manner making it easy to manage and access the data stored.
Increases data security
Chances of Security breaches increases with the increase in size of the database. Using DBMS, we can handle the data securely due to increased data privacy.
Reduces Data Inconsistency
When the same data is located at multiple places in the database it can lead to redundancy and inconsistency. But using DBMS, one can easily remove these issues.
Data Abstraction
Sometimes, it is not necessary to reveal the entire information to the user. So, we need data abstraction which can be done through a database management system. It makes it easier for the user to deal with the data as well as ensure that only a necessary part of data is exposed to the user.
Data recovery and data backups
Instead of manually backing up the data periodically to prevent data loss, one can use DBMS as it automatically backs up the data and avoid any data loss due to system failure.
A Database Management System (DBMS) is a software application that allows users to manage and organize data efficiently. The four types of DBMS are Relational DBMS (RDBMS), Hierarchical DBMS, Network DBMS, and Object-Oriented DBMS (OODBMS).
What are the 7 types of DBMS?
A Database Management System (DBMS) allows users to manage and alter data. The seven types of DBMS are Relational DBMS (RDBMS), Hierarchical DBMS, Network DBMS, Object-Oriented DBMS (OODBMS), NoSQL DBMS, Columnar DBMS, and In-Memory DBMS.
What is DBMS and DBMS types?
DBMS stands for Database Management System. It is software that allows users to store, manage, and retrieve data efficiently. The types of DBMS include Relational DBMS, Hierarchical DBMS, Network DBMS, Object-Oriented DBMS, NoSQL DBMS, Columnar DBMS, and In-Memory DBMS.
What are DBMS types examples?
Examples of DBMS types include Oracle Database, MySQL, Microsoft SQL Server, and PostgreSQL for RDBMS. IBM's Information Management System (IMS) for Hierarchical DBMS. MongoDB, Apache Cassandra, and db4o for Object-Oriented DBMS and InfluxDB, Redis, and Apache HBase for NoSQL DBMS.
Conclusion
In this article, we have discussed database management system and the types of DBMS. We have also seen required implementation and diagrams. If you want to learn about SQL, you can read the below-mentioned articles: