top of page

Welcome
to NumpyNinja Blogs

NumpyNinja: Blogs. Demystifying Tech,

One Blog at a Time.
Millions of views. 

šŸ“˜ SQL, DBMS & RDBMS Explained Simply: A Beginner’s Guide to Managing Data

Jul 11, 2025
5 min read

Updated: Jul 15, 2025


Introduction

Ever wondered how apps like Amazon, hospitals, or school systems manage huge amounts of data? The answer lies in databases and a powerful language called SQL. This blog will guide you through the basics of SQL, DBMS, RDBMS, and key database concepts — in simple, beginner-friendly terms.








DBMS(Database Management System):


Before DBMS, data was managed using manual systemsĀ like paper records, Excel sheets, or flat files like .csvĀ or .txt. There were no rules, no structure, and everything was stored in a single table. This led to a lot of duplicate data, and searching or updating records was very difficult.

Then came DBMS — Database Management Systems — which allowed us to store data in structured tables. But these tables were independent, meaning there was no relationshipĀ between them. So data duplication and integrity issues still existed.


DBMS (Database Management System)Ā is software that helps store, manage, and retrieve data from databases.

  • The concept of Database Management Systems (DBMS)Ā started in the 1960s.

  • Early DBMSs stored data but had no standardized query language.


Examples:

  • MS Access

  • dBase

  • FoxPro


In older days, SQL was used to interact with DBMSĀ , but in a more basic way.

  • SQL was used only for basic commandsĀ like:

    • CREATE TABLE

    • INSERT

    • SELECT

    • DELETE


Types of DBMS:


  1. Hierarchical DBMS – Data organized like a tree

    Example: IBM Information Management System (IMS)

  2. Network DBMS – Many-to-many relationships

    Example: Integrated Data Store (IDS)

  3. Relational DBMS (RDBMS) – Uses tables and relationships (most common)

    Example: MySQL, Oracle, SQL Server

  4. Object-Oriented DBMS – Data stored as objects

    Example: db4o, ObjectDB

  5. NoSQL DBMS – Stores flexible data formats like JSON

    Example: MongoDB, Cassandra

  6. Distributed DBMS – Data spread across systems

    Example: Apache Cassandra, Google Spanner

  7. In-Memory DBMS – Fast, uses RAM for real-time access

    Example: SAP HANA, VoltDB




RDBMS(Relational Database Management System):

RDBMS (Relational Database Management System)Ā is a type of DBMS that stores data in table format and supports relationships between data using keys.

Ā 1. Primary Key:

  • Ensures no duplicateĀ and no NULLĀ values.

  • Only one primary key per table.

Ā 2. Foreign Key:

  • Refers to the Primary KeyĀ in another table.

  • Used to link two tablesĀ (relationship).

  • Can have duplicate and NULL values.


Key Features:

  • Uses tables (rows and columns)

  • Supports primary and foreign keys

  • Ensures data integrity with ACID compliance


Examples:

  • MySQL

  • Oracle

  • PostgreSQL

  • SQL Server



Part

Role

Database

šŸ” The actual containerĀ or locationĀ where data is stored (tables, rows, columns)

DBMS

šŸ› ļø The tool/softwareĀ that helps you create and manage the database

RDBMS

🧠 An advanced DBMS that supports relationships between tables (via primary & foreign keys)


DBMS VS RDBMS:


Feature

DBMS (Database Management System)

RDBMS (Relational Database Management System)

Data Format

Stores data in files or simple tables

Stores data in tables with rows & columns

Relationships

No relationships between data

Supports relationshipsĀ between tables

Data Integrity

Limited integrity rules

Follows ACID rulesĀ for reliability

Query Language

May not support SQL fully

Uses SQLĀ to manage data

Multi-user Access

Limited or no support

Supports multiple usersĀ at the same time

Data Redundancy

Higher chances of duplication

Reduces redundancy with keys

Examples

File systems, XML

MySQL, Oracle, PostgreSQL, SQL Server




But, What is Integrity rules and ACID properties? Let's deep dive into these topics.


  • Integrity rulesĀ are like traffic rules for data. They make sure that every piece of data in a database is correct, valid, and fits in the right place. This prevents errors like duplicate IDs or missing links between tables.

Rule

Description

Example

Entity Integrity

Primary key must be unique and not null

Each student must have a unique ID

Referential Integrity

Foreign key must match a primary key in another table

Can't enter marks for a student who doesn't exist

Domain Integrity

Data must follow correct data type and rules

Age must be a number, not 'ABC'



  • ACID propertiesĀ are like safety rules for transactions. They make sure that every database operation (like saving or transferring data) happens completely and safely — even if something goes wrong like a system crash.

Property

Meaning

Example

Atomicity

All steps of a transaction must succeed or none

Money transfer: both accounts update or none do

Consistency

Keeps data valid before and after changes

Can't break rules like foreign keys

Isolation

Transactions work separately without conflict

Two users can buy products at the same time

Durability

Once data is saved, it remains safe

Survives power failure


Real-World Applications of DBMS

  1. Banking – Manage accounts and transactions

  2. E-commerce – Product, order, and customer data

  3. Education – Student records, attendance, grades

  4. Healthcare – Patient history, appointments

  5. Telecom – Call logs, billing, user plans

  6. Transport – Ticket booking, schedules

  7. Government – ID, tax, vehicle registration

  8. Social Media – Profiles, posts, messages

  9. ERP Systems – Inventory, HR, finance

  10. Websites/Blogs – Posts, comments, users



What is SQL?

SQL (Structured Query Language)Ā is the language we use to interact with the database — to create, read, update, or delete data. SQL doesn’t directly interact with the physical database — the DBMS/RDBMS does that.




Why SQL is Popular:

  • Easy to learn and use

  • Simple syntax (uses English-like commands)

  • Portable across most databases

  • Supports querying, views, and transactions



How SQL, DBMS & RDBMS Work Together?

Layer

What it Does

šŸ‘¤ You (User)

Write SQL commands

šŸ’¬ SQL (Language)

Sends the request (command)

🧠 DBMS/RDBMS

Understands the SQL and fetches/stores data

šŸ’¾ Database

The actual data is stored here


Types of SQL Commands:


a)DDL – Data Definition Language

Used to define and manage the structureĀ of database objects (tables, schemas, etc.).

Command

Use

CREATE

Create new table or database

ALTER

Modify existing table (add/remove column)

DROP

Delete table or database

TRUNCATE

Remove all records from a table (faster than DELETE)

RENAME

Rename a table or column

b) DML – Data Manipulation Language

Used to manipulate dataĀ (add, update, delete rows).

Command

Use

INSERT

Add new data to a table

UPDATE

Modify existing data

DELETE

Remove data from a table

c) Ā DQL – Data Query Language

Used to query dataĀ from the database.

Command

Use

SELECT

Retrieve data from one or more tables

d) DCL – Data Control Language

Used to control accessĀ and permissions.

Command

Use

GRANT

Give user access to database objects

REVOKE

Remove user access

e) TCL – Transaction Control Language

Used to manage transactionsĀ (groups of SQL operations).

Command

Use

COMMIT

Save all changes made by the transaction

ROLLBACK

Undo changes if there is an error

SAVEPOINT

Create a save point to roll back to

SET TRANSACTION

Set the properties of a transaction



ā€œPostgreSQL is the actual RDBMSĀ software we use to manage data.

We create one or more databasesĀ inside PostgreSQL to store tables.

And we use PgAdminĀ as a GUI to connect to PostgreSQL and manage everything visually.ā€




Conclusion

SQL is a powerful, beginner-friendly tool used across almost every industry — from banks and hospitals to websites and social media. Learning SQL gives you the power to understand, manage, and extract insights from data — a valuable skill in today's tech-driven world.

šŸ’¬ Got questions or want help writing your first SQL query? Drop it in the comments below!

Ā 
Ā 

+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