Database Management System#
A database management system is a software system that manages, stores, and retrieves data efficiently in a structured format. DBMS acts as a bridge between a central database and multiple clients, including apps and users.
A DBMS connects the central database with multiple clients.
It allows users to create, update, and query databases efficiently.
Ensures data integrity, consistency, and security across multiple users and applications.
Reduces data redundancy and inconsistency through centralized control.
Supports concurrent data access, transaction management, and automatic backups.
Uses APIs to handle data requests, ensuring secure and efficient access.
Problems with Traditional File-Based Systems#
Before the introduction of modern DBMS, data was managed using basic file systems on hard drives. While this approach allowed user st ostore, retrieve and update files as needed it came with numerous challenges:
Duplicate entries across files.
Conflicting or outdated information.
Manual file search required.
No control over data access.
No support for collaboration.
Data loss was often permanent.
A university file-based system storing data in separate files (e.g. Acaademics, Results, Hostels) often faced these problems.
Components of DMBS Applications#
Any DMBS based application is made up of six key components that work together to handle data effectively.
Physical devices like servers, disks, input-output devices. Stores and processes data; interfaces between real-world inputs and digital systems.
Actual DBMS software like MySQL, Oracle, PostgreSQL. Includes the database engine, OS, network software, and application tools. Translates database access languages into operations.
Raw facts stored in structured or unstructured formats.
- Operational Data
Actual user data.
- Metadata
Data about data.
Core reason DBMS exists is to manage and store data efficiently.
Instructions and rules for using DBMS effectively. Covers setup, login/logout, data validation, backup, access control, and report generation. Helps ensure consistent and secure use of the system.
Used to interact with the database (create, read, update, delete).
Examples
SQL, MyAcces, Oracle PL/SQL
- Data Definition Language
CREATE, ALTER, DROP
- Data Manipulation Language
INSERT, UPDATE, DELETE
Users interacting with DBMS at different levels.
- Database Administrators
Manage security, performance, user access.
- Developers
Build applications using the database.
- End-Users
Use applications to access the database.
Types of DBMS#
There are several types of DBMS, each tailored to different data structures, scalability requirements and application needs. The most common types are as follows:
Relational Database Management System#
RDBMS organizes data into tables (relations) composed of rows and columns. Uses primary keys to uniquely identify rows and foreign keys to establish relationships between tables. Queries are written in Structured Query Language (SQL), which allows for efficient data manipulation and retrieval.
NoSQL DBMS#
They are designed to handle large-scale data and provide high performance for scenarios where relational models might be restrictive. They store data in various non-relational formats such as key-value pairs, documents, graphs, or columns. These flexible data models enable rapid scaling and are well-suited for unstructured or semi-structured data.
Examples
MongoDB, Cassandra, DynamoDB, and Redis
Object-Oriented DBMS#
OODBMS integrates object-oriented programming concepts into the database environment allowing data to be stored as objects. Supports complex data types and relationships=, making it ideal for applications requiring advanced data modeling and real-world simulations.
Hierarchical Database#
Organizes data in a tree-like structure, where a record (node) has a single parent and have multiple children. This model is simlar to a file system with folders and subfolders. It is efficient for storing data with a clear hierarchy, such as organizational charts or file directories. Navigation is fast and predictable due to the fixed structure. It lacks flexibility and is difficult to restructure or handle complex many-to-many relationships.
Network Database#
It uses a graph-like model to allow more complex relationships between entities. Unlike the hierarchical model, it permits each child to have multiple parents, enabling many-to-many relationships. Data is represented using records and sets, where sets define the relationships.
Cloud-Based Database#
They are hosted on cloud computing platforms like AWS, Azure, or Google Cloud. They offer on-demand scalability, high availability, automatic backups, and remote accessibility. These databases can be relational or non-relational and are maintained by cloud service providers, reducing administrative overhead. They support modern application requirements, including distributed access and real-time analytics.
Examples
Amazon RDS, MongoDB Atlas, Google BigQuery
Database Languages#
Database languages are specialized sets of commands and instructions used to define, manipulate and control data within a database. Each language type plays a distinct role in database management, ensuring efficient storage, retrieval and security of data.
Types of DBMS Language#
Deals with database schemas and descriptions, of how the data should reside in the database.
- CREATE
To create a database and its objects.
- ALTER
ALters the structure of the existing database.
- DROP
Delete objects from the database.
- TRUNCATE
Remove all records from a table, including all spaces allocated for the records are removed.
- COMMENT
Add comments to the data dictionary.
- RENAME
Rename an object.
Focuses on manipulating the data stored in the database, enabling users to retrieve, add, update and delete data.
- INSERT
Insert data into a table.
- UPDATE
Updates existing data within a table.
- DELETE
Delete all records from a database table.
- MERGE
UPSERT operation (insert or update).
- CALL
Call a PL/SQL or Java subprogram.
- EXPLAIN PLAN
Interpretation of the data access path.
- LOCK TABLE
Concurrency control.
Commands manage access permissions, ensuring data security, by controlling who can perform certain actions on the database.
- GRANT
Provides specific privileges to a user.
- REVOKE
Removes previously granted permissions from a user.
Commands oversee transactional data to maintain consistency, reliability, and atomicity.
- ROLLBACK
Undoes changes made during a transaction.
- COMMIT
Saves all changes made during a transaction.
- SAVEPOINT
Sets a point within a transaction to which one can later roll back.
A subset of SQL to retrieve data from a database without modifying it. Its main comand is SELECT, which allows users to fetch specific information based on their requirements.
Applications of DBMS#
Banking
Library Systems
Payroll systems
Healthcare
Social media
Online shopping
Education
Human resources
Research
Inventory MS
Data science