Free tutorials & notes in Hindi & English · Clean code examples 🧰 Free PDF & Image Tools →
MySQL + SQL · Lesson 13

What is a Relational Database?

In this lesson: Relational database explained — tables, rows, columns, keys and relations — with simple student/course examples.

What is a relational database

A relational database stores data in tables and links those tables together using keys. It follows the relational model, is managed with SQL, and is by far the most popular kind of database. MySQL, PostgreSQL and Oracle are all relational databases.

💡 Relational database = data in tables + tables linked by keys + managed with SQL.

Everything is a table

In a relational database, all data lives in tables of rows and columns:

idnamecity
1AmanDelhi
2DiyaMumbai

Columns define the fields; each row is one record. This simple, uniform structure is easy to understand and query.

Relationships via keys

Tables connect using keys. A foreign key in one table points to the primary key of another:

customers(id PK, name)
orders(id PK, customer_id FK -> customers.id, amount)

This lets you store customer details once and link many orders to them — no duplication, and the data stays consistent.

SQL is the language

SELECT name, city FROM customers WHERE city = 'Delhi';

Relational databases are managed with SQL (Structured Query Language). You use it to create tables, add and change data, and run queries. Because SQL is a standard, your skills carry across different relational databases.

Reliable with ACID

Relational databases support ACID transactions — Atomicity, Consistency, Isolation, Durability. This means a group of changes either fully succeeds or fully fails, and committed data is never lost. It is what makes them trustworthy for banking, orders and other critical data.

Why it is popular

  • Simple model — tables are easy to understand.
  • Powerful queries — SQL can join, filter and summarise data easily.
  • Data integrity — keys and constraints keep data correct.
  • Reliability — ACID transactions protect important data.

These strengths make relational databases the default choice for most applications.

Common mistakes

  • Confusing relational and non-relational. Relational uses fixed tables and SQL; NoSQL is more flexible.
  • Repeating data instead of using keys. Link tables with foreign keys.
  • Mixing up MySQL and SQL. MySQL is the database; SQL is the language.
  • Ignoring ACID. It is why transactions are safe.

Summary

  • A relational database stores data in tables linked by keys.
  • It follows the relational model and is managed with SQL.
  • Foreign keys connect tables and avoid duplication.
  • ACID transactions make it reliable for critical data.
  • Its simplicity and power make it the most popular database type.

Next, learn the table model in RDBMS concepts, or the wider picture in the DBMS tutorial.

Frequently Asked Questions

What is a relational database?
A relational database stores data in tables (rows and columns) and links those tables together using keys. It follows the relational model, uses SQL to manage data, and is the most widely used kind of database. MySQL and PostgreSQL are examples.
Why is it called relational?
It is called relational because it is based on the mathematical idea of relations (tables) and the relationships between them. Tables connect through keys, so data in one table can relate to data in another.
How is a relational database different from other databases?
Relational databases store data in structured tables with fixed columns and use SQL. Non-relational (NoSQL) databases store data more flexibly, like documents or key-value pairs, and are used when the structure varies or scale is huge.
What language do relational databases use?
They use SQL (Structured Query Language) to create tables, insert and update data, and run queries. SQL is a standard language, so skills transfer across MySQL, PostgreSQL, Oracle and others.
What does ACID mean in a relational database?
ACID stands for Atomicity, Consistency, Isolation and Durability. These properties make transactions reliable, so a group of changes either all succeed or all fail, and committed data is never lost. This is key for things like banking.
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

💻 Live Code Editor

This page's programs are ready here — run them, edit them, and learn. No installation needed.
Powered by OneCompiler. The code loads into the editor automatically — press Run to see the output. If the editor does not open, open it in a new tab.
Next topicRDBMS Concepts with Examples Your progress: 13 / 151 (9%) · Lesson 14 / 151 Continue →

How was this lesson?

Your feedback helps us make the content better.

Write a review or suggestion (optional)

After approval, your name and city may appear publicly with your review. Please do not write your email or phone number.

▶ Video lesson

RDBMS Part 3 – Class XI Commerce IT

Video lesson on Relational Database Management Systems (RDBMS) for Class XI Commerce IT students, by CodingEasily.

RDBMS Part 3 – Class XI Commerce IT – video thumbnailRDBMS Part 3 – Class XI Commerce IT

▶ Subscribe on YouTube