top of page

Welcome
to NumpyNinja Blogs

NumpyNinja: Blogs. Demystifying Tech,

One Blog at a Time.
Millions of views. 

DBMS & SQL: The Power Duo Behind Data Management

May 1, 2025
6 min read

In the modern digital world, data is omnipresent - from customer information to student details, medical records to transaction history - and the bedrock of every establishment. Data can be text, video, image or other formats. They are the foundation of all business and are regarded as the most important asset for any organization to thrive in today’s highly competitive market. 

Thus, arises the need for systematic maintenance of these data, for businesses and applications to run smoothly.  Here comes DBMS, which plays a crucial role in supporting data-driven decision-making and operational efficiency.


 A DATABASE MANAGEMENT SYSTEM (DBMS) efficiently stores, organizes and retrieves data in a structured manner. It is a software solution that allows users to create, modify, and query databases while ensuring data integrity, security and ease of data access.

A database schema is the structure that defines how data will be stored and organized within a database.



Database SCHEMA outlines:


·  Tables

·  Fields

·  Datatypes of each field

·  Relationship between tables

·  Constraints and rules for data integrity

 

 

Key Features of DBMS are:


1. DATA MODELING – Tools to create and modify data models, defining structure and relationships within databases.

 

2. DATA STORAGE and RETRIEVAL – Efficient mechanism to store data and execute queries to retrieve them as and when necessary.

 

3. DATA INTEGRITY and SECURITY – Implementing constraints and rules to maintain data accuracy and secure data by enabling encryption and access control.   

NORMALIZATION is the process of organizing data into multiple related tables thereby reducing redundancy and improving data integrity.

 

4. CONCURRENCY CONTROL – Ensures multi-user access (simultaneously) without conflict.

 

5. BACKUP and RECOVERY – Schedule regular backups to allow recovery incase of system failure.

 

 

DATA MODEL and TYPES

There are several types of Database Management System (DBMS) each tailored to different data structures, scalability requirements and application needs. The most common types are as follows:

 

Relational Database Management System (RDBMS)

RDBMS organizes data into TABLE (Schema) consisting of ROWs (records) and COLUMNs (fields). Each table represents an entity and relationships between entities are established by keys. It uses Primary Key to uniquely identify rows and Foreign Key to establish relationship between tables. Queries are written in SQL (Structured Query Language) to allow efficient data manipulation and retrieval.

This type of DBMS is widely used because it is reliable, scalable and easy to manage.

Examples: MySQL, Oracle, MS SQL Server and Postgres SQL.  

 

No SQL DBMS

NoSQL systems are designed to handle large-scale data and provide high performance for cases where relational models are restricted. NoSQL databases provide flexible data models that can handle unstructured and semi-structured data, thereby enabling data scalability and high performance across distributed environments.

Examples: MongoDB, Cassandra, DynamoDB and Redis.

 

Object-Oriented DBMS (OODBMS)

OODBMS integrates object-oriented programming concepts into database environments, allowing data to be stored as objects. This system supports complex datatypes and handles complex relationships, making it suitable for applications requiring advanced data modeling and real-world simulations.

Examples: Object DB, db4o.

 

Database and SQL Operations

 

Database Languages

Database Languages are special sets of commands and instructions used to define, manipulate and control data within the database. Structured Query Language (SQL) serves as the standardized language to communicate with RDBMS. SQL is broadly classified into 5 categories as stated below.


1.     Data Definition Language (DDL)

DDL is a subset of SQL commands which define how the data should reside in the database.

Common DDL commands are:


  • CREATE – this command is used to create tables, index, views, stored procedures, function and triggers.

 Syntax:


  • ALTER – this command modifies existing tables.

    Syntax:


  • DROP – this command removes a database object permanently.

Syntax:






  •  TRUNCATE – this command deletes all data from a table without altering its structure.

Syntax:

  • RENAME – this command is used to change the name of a table or a column.

Syntax:






  •  COMMENT – this command helps to add comment to the data dictionary.


As shown in the create table command, DDL also handles constraints which enforce data integrity rules. Common constraints include:

·       NOT NULL – ensures that a column will always contain values

·       UNIQUE – prevents duplicate values in a column

·       PRIMARY KEY – identifies each row uniquely

·       FOREIGN KEY – Maintains referential integrity between tables

 

2.     Data Manipulation Language (DML)

DML is another subset of SQL commands that focuses on data manipulation allowing users to retrieve, add, update and delete data. Common DML commands include:


  • INSERT – insert new row of data in a table

  • UPDATE – modifies existing record in a table

  • DELETE – removes row from a table

  • MERGE – UPSERT operation i.e. UPDATE's incase a row exists and INSERT’s if the row does not exist

  • CALL – call a PL/SQL or Java subprogram

  • EXPLAIN PLAN – interpretation of data access path

  • LOCK TABLE – concurrency control

 

3.     Data Control Language (DCL)

DCL commands manage user access, ensuring data security by controlling who can perform certain actions on the database. Common DCL commands are:


  • GRANT – provides specific privilege to a user

  • REVOKE – removes previously granted permission to a user

     

4.     Transaction Control Language (TCL)

TCL command inspects transactional data to maintain consistency, reliability and atomicity. Common TCL commands are:


  • ROLLBACK – undo changes made during a transaction

  • COMMIT – Save all changes made during a transaction

  • SAVEPOINT – Sets a point within a transaction to which one can later roll back.

 

5.     Data Query Language (DQL)

DQL is that subset of DML which specifically focuses on data retrieval.


  • SELECT – retrieves data from a table (or from multiple tables through JOINs)


 

Data Integrity and Security

Database security and data integrity are fundamental aspects of DBMS. Access control, authentication mechanisms, encapsulation and encryption are some of the ways to implement security.

 

 

Transaction Management and Concurrency

Transaction management and concurrency control ensure data integrity and consistency when multiple users access and modify data simultaneously.

Transaction in database system adheres to ACID properties:


  • ATOMICITY – a transaction is treated as a single, indivisible unit. It either happens at once or doesn’t happen at all.

  • CONSISTENCY – transaction maintains the database in a valid state i.e. structure of database remains consistent before and after transaction.

  • ISOLATION – multiple transactions occur independently without any interference.

  • DURABILITY – once a transaction is committed, its changes are permanent even if system failure occurs.

 

Concurrency Control

In multi-user environments, concurrent execution can lead to various challenges like:

  • Dirty Reads – refers to a transaction reading uncommitted data from another transaction leading to potential inconsistencies if the changes are rolled back later.

  • Lost Updates – when two or more transactions update the same data simultaneously, one update could overwrite the other causing loss of data.

To overcome these challenges, we need Concurrency Control. Here are some of the Concurrency Control Mechanisms


  • Lock-based protocol: this mechanism allows transaction to acquire lock for reading (shared lock) and changing (exclusive lock) data.

    If one transaction holds an exclusive lock another transaction cannot acquire a shared or exclusive lock for the same data.


  • Timestamp-based protocol: this mechanism assigns unique timestamps to each transaction, and conflicts are resolved based on the timestamps.


  • Multi-version concurrency control: this mechanism creates duplicate copies of records to allow concurrent read and write access without blocking. Though MVCC are more user friendly than traditional LOCK but concurrent update control methods are difficult to implement, and the database also grows with multiple copies.

To deal with data bloating, PostgreSQL MVCC uses a process called VACCUM which deletes duplicate or unwanted records created by multi version concurrency control process.


 

Data Backup and Recovery

Efficient DBMS requires a robust backup system to support data recovery in case of hardware or software failures. Database backup methods depend on system requirement and data volume. Full backup captures the entire database. Incremental backups only store changes made since the last backup and Differential backups save all modifications since the recent full backup.  Cloud-based backups may also be done for offsite storage.

Scheduling automated backups help maintain consistent backups. Testing backups regularly ensures successful restoration when needed.

 

 

DBMS, RDBMS and SQL - Is there a difference?


DBMS is a software system that stores and manages a database. It provides controlled access to data.

RDBMS is a type of DBMS that allows relationships and key constraints. While a DBMS database may be hierarchical, RDBMS always stores data in tables with relationships between them.

SQL is the standard language to access and manipulate data.

DBMS provides infrastructure for data storage and management while SQL provides the means to interact with the data. Together they form the backbone of data management system for data analysis and manipulation across platforms and applications.



Thank You for reading !

 



 
 

+1 (302) 200-8320

NumPy_Ninja_Logo (1).png

Numpy Ninja Inc. 8 The Grn Ste A Dover, DE 19901

© Copyright 2025 by Numpy Ninja Inc.

  • Twitter
  • LinkedIn
bottom of page