Rdbms Tutorial
What is RDBMS?
A plain DBMS just stores data. An RDBMS goes further: it stores data in related tables, enforces rules (constraints), and keeps data accurate and consistent. This is why almost every real application — banking, e-commerce, school management — runs on an RDBMS.
How Data is Stored
Data is stored in a table (also called a relation). Each row is one record and each column is one field. Here is a simple students table:
| roll_no (PK) | name | class | marks |
|---|---|---|---|
| 1 | Aman | 10 | 88 |
| 2 | Priya | 10 | 92 |
| 3 | Ravi | 10 | 76 |
CREATE TABLE students ( roll_no INT PRIMARY KEY, name VARCHAR(50), class INT, marks INT );
Keys in RDBMS
Keys uniquely identify rows and connect tables. They are the heart of the relational model.
| Key | Meaning |
|---|---|
| Primary Key | Uniquely identifies each row; cannot be NULL or duplicate. |
| Foreign Key | A column that refers to the primary key of another table, creating a relationship. |
| Candidate Key | Any column that could serve as a primary key. |
| Composite Key | A primary key made of two or more columns together. |
An orders table can have a student_id foreign key pointing to students.roll_no. That link is what makes the database "relational".
ACID Properties
An RDBMS guarantees reliable transactions through ACID:
| Property | Meaning |
|---|---|
| Atomicity | A transaction runs fully or not at all. |
| Consistency | The database moves from one valid state to another. |
| Isolation | Concurrent transactions do not interfere with each other. |
| Durability | Once committed, data survives even a power failure. |
DBMS vs RDBMS
| Point | DBMS | RDBMS |
|---|---|---|
| Data storage | Files or single structure | Tables (relations) |
| Relationships | Not supported well | Supported via foreign keys |
| Keys / constraints | Limited | Primary/foreign keys, constraints |
| ACID transactions | Usually no | Yes |
| Example | File systems, XML | MySQL, Oracle, PostgreSQL |
Popular RDBMS Software
| RDBMS | Best for |
|---|---|
| MySQL | Free, fast — web apps and learning |
| Oracle | Large enterprise systems |
| SQL Server | Microsoft technology stack |
| PostgreSQL | Advanced, open-source, standards-compliant |
Codd's Rules (in short)
E. F. Codd defined 12 rules (numbered 0–12) that a system must follow to be a true relational database — covering how data must be stored in tables, accessed by SQL, and kept independent of physical storage. In practice, no RDBMS follows all 12 perfectly, but MySQL, Oracle and PostgreSQL follow most of them.
The relational model was proposed by E. F. Codd in 1970 — a very common one-mark exam question.
Summary
- RDBMS stores data in related tables and uses SQL (relational model by Codd, 1970).
- Keys: primary (unique), foreign (links tables), candidate, composite.
- ACID = Atomicity, Consistency, Isolation, Durability.
- RDBMS adds relationships, constraints and ACID over a plain DBMS.
- Examples: MySQL, Oracle, SQL Server, PostgreSQL.