Session 2: Moving from Pain to Understanding
⚠️ Warning: We will not use dictionary definitions today.
A database is not a box that holds data.
A database is a model of the real world.
If you change how you see this, everything else becomes obvious.
What exists in a college? Name the nouns.
"If you can't name it, you can't store it."
Each noun becomes a planet. Each planet has its own gravity.
Click a planet to see its properties. Notice: they don't collide. They relate.
It's a thing. A real-world entity frozen in structure.
"A report I print for the principal"
"A list I make in Excel"
"Something I format for looks"
"A student exists whether I look or not"
"Rahul is Rahul, even in the dark"
"Reality, captured in structure"
"A table is not a report. A table is a thing."
How do we know which Rahul is which? Click to test:
A unique identifier that has no business meaning.
It exists only to say: "This is THE one."
Never shared by two rows
Never changes, ever
No business logic attached
The Lie Detector Test:
Names describe.
IDs identify.
Your face changes.
Your name changes.
Your address changes.
But your DNA never does.
Phone numbers change.
Email addresses change.
Names get corrected.
But the Primary Key never does.
A Primary Key is the DNA of a record.
"Give me a thing that exists in reality.
I will give it an identity that never lies.
Then I will protect that identity
from everyone, including you."
A database models reality, not just stores data
Tables are things, reports are views
Primary Keys are the DNA of records
Rules protect truth from human error
Next: How do these entities talk to each other?
Relationships, Blueprints & The Victory of RDBMS