01. Database Explainer: RDBMS & Relational Theory
Before big data lakes, Spark, or Snowflake existed, the entire digital economy ran on Relational Databases. Learn the mathematical foundation that powers every financial bank, airline reservation system, and enterprise application on earth.
2. An RDBMS (PostgreSQL, Oracle, MySQL, SQL Server): Is a high-security vault managed by a superhuman Master Librarian. Every folder has a strict blueprint (Schema), every page has a unique serial barcode (Primary Key), and related folders are cross-referenced with unbreakable red threads (Foreign Keys).
ACID Properties Explained for Beginners
The four golden promises every relational database guarantees during transactions.
All or Nothing
If you transfer $100 from Account A to Account B, either both steps succeed, or the entire operation rolls back to 0. The bank will never deduct from A without crediting B!
Rules Never Broken
Every database constraint (e.g. balance >= 0, email must contain @) must hold true before and after every transaction. Illegal data is instantly rejected.
No Stepping on Toes
Even if 1,000 customers make purchases at the exact same microsecond, each transaction executes as if it were the only one running on the entire computer.
Saved Forever
Once a transaction commits and returns "Success", the data is committed to disk logs (WAL). Even if someone unplugs the server power cord 1 millisecond later, the record survives!
E.F. Codd's 12 Rules & Relational Theory
In 1970, IBM researcher Dr. Edgar F. Codd invented the Relational Model. In 1985, he published his famous 12 Rules (further expanded by Chris Date) to define what makes a true relational database.
All Information Must Be in Tables
All data at the logical level must be represented strictly as column values in rows of tables. There are no hidden pointers, memory addresses, or invisible files that users must navigate.
Table vs. Entity: What is the Difference?
Novices often use "Entity" and "Table" interchangeably, but in Data Engineering, they represent two different levels of abstraction.
1. The Entity (The Idea)
An Entity is a real-world person, place, physical object, or business concept about which we want to store information.
•
Customer (A human with a name and phone number)•
Product (A pair of running shoes on a warehouse shelf)•
Order (The business event when a customer buys shoes)
2. The Table (The Implementation)
A Table (mathematically called a Relation) is the concrete 2-dimensional grid of rows and columns created inside the SQL database engine to hold an Entity's data.
CREATE TABLE customers (
id INT PRIMARY KEY,
full_name VARCHAR(100),
email VARCHAR(255)
);
Rows • Records • Tuples
Three words that describe the exact same concept across math, computer science, and business.
An ordered set of attribute values representing a single proposition of fact.
A single chunk of binary bytes written together on a magnetic hard drive or SSD block.
A single horizontal line on your screen representing one customer, order, or student.
Columns • Attributes • Domains • Data Types
How columns define the characteristics of an entity and enforce strict mathematical validation rules.
A named property that describes the entity. For example, in a customers table, the attributes are first_name, email, and signup_date.
The permitted pool of valid values. An INT column will never accept the letter 'Z'. A DATE column requires a valid calendar day.
A column in Table A that points to the Primary Key of Table B (e.g. orders.customer_id → customers.id). Prevents "orphan" orders.
2D Interactive Relational Table Simulator
Experience how Primary Keys, Foreign Keys, and constraints work live in action. Click the controls below to inspect and test relational rules!
customers
| id PK • INT | full_name VARCHAR | email VARCHAR | country CHAR(2) |
|---|---|---|---|
| 101 | Alice Walker | alice@acme.com | US |
| 102 | Bob Martinez | bob@techcorp.io | CA |
| 103 | Chen Wei | chen@global.cn | SG |
orders
| order_id PK • INT | customer_id FK • INT | product_name VARCHAR | amount_usd DECIMAL |
|---|---|---|---|
| 9001 | 101 | MacBook Pro M3 | $2,499.00 |
| 9002 | 101 | USB-C Hub Cable | $49.00 |
| 9003 | 102 | Dell 4K UltraSharp | $799.00 |