Checking your session…
Module 02: Introduction to Databases and SQL

2.4 RDBMS and the Role of SQL

Level: 2 | Version: v1.1 | Author: Meptrasoft

Overview

RDBMS stands for Relational Database Management System.

An RDBMS is a type of DBMS that stores data mainly in tables, using rows and columns. Related tables can be connected using keys.

For example, a college system may have:

TEXT
Students
Courses
Departments
Marks

A relationship can connect these tables. For example, a student can belong to a department, and a student can have many marks records.

RDBMS is a type of DBMS that organizes data into related tables.

SQL stands for Structured Query Language. It is the language commonly used to interact with relational databases.

TEXT
RDBMS → Stores and manages relational data
SQL   → Used to query and manipulate that data
RDBMS and the Role of SQL: How data is organized, managed, and queried in a relational database system
Figure 1: An RDBMS stores related data in tables, while SQL is used to query and manipulate that data.

What Makes an RDBMS Relational?

The word relational refers to the relationships between tables.

Consider two tables:

Departments

Dept_ID Department_Name
10 CSE
20 IT

Students

Student_ID Name Dept_ID
101 Arun 10
102 Priya 20
103 Karthik 10

Here, Dept_ID in the Students table refers to Dept_ID in the Departments table.

This allows the database to represent the relationship:

TEXT
Departments
     ↑
     │
   Dept_ID
     │
     ↓
Students

The database can use keys to define and maintain these relationships.


What Is a Table in an RDBMS?

A table is a structured collection of related data.

For example:

Student_ID Name Department Marks
101 Arun CSE 87
102 Priya IT 91
103 Karthik CSE 78

In a relational table:

  • Row → one record
  • Column → one attribute
  • Table → collection of related records

Tables provide a consistent structure for storing and querying data.


Role of SQL

SQL is the language used to communicate with relational database systems.

We can use SQL to:

  • Retrieve data
  • Insert data
  • Update data
  • Delete data
  • Create database objects
  • Define relationships and constraints
  • Aggregate and analyze data

For example:

SQL
SELECT Name, Marks
FROM Students
WHERE Marks > 80;

The database returns:

Name Marks
Arun 87
Priya 91

The SQL statement tells the database what result is required.


How SQL and an RDBMS Work Together

A simple request flow is:

TEXT
USER / APPLICATION
        ↓
    SQL QUERY
        ↓
       RDBMS
        ↓
     TABLE DATA
        ↓
      RESULT

For example, a student management application may send:

SQL
SELECT *
FROM Students
WHERE Department = 'CSE';

The RDBMS processes the query and returns the matching records.

Important Idea

SQL is not the database.

SQL is the language used to communicate with the database.

The RDBMS is the software that manages the relational database and processes SQL statements.

TEXT
SQL   → Language
RDBMS → Software
Data  → Stored information

Declarative Nature of SQL

SQL is commonly described as a declarative language.

This means you generally tell the database what data you want, rather than specifying every step required to retrieve it.

For example:

SQL
SELECT *
FROM Employees
WHERE Salary > 50000;

You specify:

“Give me employees whose salary is greater than 50,000.”

You do not normally tell the database:

“Scan this file, compare each row, store matching rows in memory, then sort them.”

The RDBMS's query optimizer determines an efficient execution strategy.

Simple Idea

TEXT
SQL
  ↓
WHAT DATA IS NEEDED?
  ↓
RDBMS QUERY PROCESSING
  ↓
HOW TO GET IT?
  ↓
RESULT

SQL describes the required result; the database system determines how to execute the request.


Real-World Example: Online Shopping

Consider an online shopping application.

The RDBMS might contain:

TEXT
Customers
Products
Orders
Order_Items
Payments

When a customer searches for products, the application sends an SQL query.

TEXT
Customer
   ↓
Shopping App
   ↓
SQL Query
   ↓
RDBMS
   ↓
Products Table
   ↓
Search Result

The application then displays the result to the customer.

This is how SQL becomes the communication language between an application and a relational database system.


RDBMS vs DBMS

An RDBMS is a specific type of DBMS.

DBMS RDBMS
General term for database management software Type of DBMS based on the relational model
Can support different database models Organizes data into related tables
May or may not use relationships between tables Uses relationships between tables
Examples depend on the database model PostgreSQL, MySQL, Oracle Database, SQL Server

Every RDBMS is a DBMS, but not every DBMS is an RDBMS.


Examples of RDBMS

Common relational database management systems include:

  • PostgreSQL
  • MySQL
  • Oracle Database
  • Microsoft SQL Server
  • SQLite

They support relational tables and SQL, although each product has its own features, syntax extensions, and implementation details.


Brief History of the Relational Model

The relational model was introduced by Edgar F. Codd at IBM in 1970.

The model provided a mathematical foundation for representing data as relations, which are commonly implemented as tables in relational database systems.

For beginners, the main idea to remember is:

The relational model organizes data into related structures, and modern RDBMS products implement this model using tables, keys, constraints, and SQL.


Common Beginner Mistakes

✗ Mistake ✓ Correct Understanding
RDBMS and DBMS are completely different things RDBMS is a type of DBMS
SQL is an RDBMS SQL is a language used to work with an RDBMS
Every table must be unrelated to other tables Tables can be connected through keys and relationships
SQL tells the database exactly how to access the disk SQL generally specifies what result is required; the optimizer chooses an execution plan
A foreign key stores the entire related table A foreign key stores a value that refers to a key in another table
Every DBMS is relational Database systems can use different models; RDBMS specifically uses the relational model

Placement Quick Points

TEXT
RDBMS
→ RELATIONAL DATABASE MANAGEMENT SYSTEM
→ STORES DATA IN RELATED TABLES

TABLE
→ ROWS + COLUMNS

KEYS
→ HELP IDENTIFY RECORDS AND CONNECT TABLES

SQL
→ LANGUAGE USED TO QUERY AND MANIPULATE RELATIONAL DATA

SQL
→ WHAT DATA IS NEEDED

RDBMS
→ HOW TO EXECUTE THE REQUEST
  • RDBMS is a type of DBMS based on the relational model.
  • Relational data is commonly organized into tables.
  • Tables can be related using keys such as primary keys and foreign keys.
  • SQL is the standard language commonly used to interact with relational databases.
  • SQL is declarative: it describes the desired result, while the database system determines an execution strategy.
  • PostgreSQL, MySQL, Oracle Database, SQL Server, and SQLite are common RDBMS products.
  • Edgar F. Codd introduced the relational model in 1970.

Interview Questions

What is an RDBMS?

RDBMS stands for Relational Database Management System. It is a type of DBMS that stores and manages data using related tables.

What is the difference between DBMS and RDBMS?

A DBMS is a general term for software used to manage databases. An RDBMS is a type of DBMS that follows the relational model and organizes data into related tables.

What is the role of SQL in an RDBMS?

SQL is used to retrieve, insert, update, delete, define, and analyze data in a relational database.

Why is SQL called a declarative language?

Because the user specifies what result is required, while the database system decides how to execute the request.

Who introduced the relational model?

Edgar F. Codd introduced the relational model at IBM in 1970.

Give examples of RDBMS.

Examples include:

TEXT
PostgreSQL
MySQL
Oracle Database
Microsoft SQL Server
SQLite
How are tables related in an RDBMS?

Tables can be related using keys. A common example is a foreign key referencing a key in another table.

What happens when an application sends an SQL query?

The RDBMS receives the SQL statement, processes it, accesses the required data, and returns the result to the application.


Practice & Hands-On Exercises

Beginner Practice

  1. What does RDBMS stand for?
  2. Define RDBMS in your own words.
  3. What is the difference between DBMS and RDBMS?
  4. What is the role of SQL?
  5. Name five RDBMS products.

Think and Answer

  1. Why are relationships between tables useful?
  2. Why is SQL called declarative?
  3. What is the difference between a table, a row, and a column?
  4. Why should an application normally use the RDBMS instead of directly accessing database files?

SQL Connection

Consider:

TEXT
Departments
Dept_ID | Department_Name

Students
Student_ID | Name | Dept_ID
  1. Which column connects the two tables?
  2. Explain why Students is related to Departments.
  3. Write a SQL query to display students belonging to the CSE department:
SQL
SELECT s.Student_ID, s.Name, d.Department_Name
FROM Students s
JOIN Departments d ON s.Dept_ID = d.Dept_ID
WHERE d.Department_Name = 'CSE';
  1. Write a SQL query to display all employees from the IT department:
SQL
SELECT *
FROM Employees
WHERE Department = 'IT';
  1. Explain what part of the SQL statement represents what data is needed.

💡 Tip: Test your queries using the in-browser interactive runner above.


Key Takeaway

TEXT
APPLICATION
     ↓
    SQL
     ↓
   RDBMS
     ↓
RELATED TABLES
     ↓
    RESULT

RDBMS stores data in related tables, while SQL provides the language used to query and manipulate that relational data.

End of RDBMS and the Role of SQL