Everything is connected. Your database must reflect this.
Look familiar? This is what happens when we don't understand relationships.
"Reality is connected.
Tables must be connected."
A student is not a course.
A course is not a teacher.
But they relate to each other.
Click each to understand. These mirror how reality actually works.
Examples: Citizen → Passport | Student → ID Card
Rare but exists. One entity, one unique counterpart.
Examples: One Student → Many Enrollments | One Customer → Many Orders
Most common. Parent owns children.
Examples: Students ↔ Courses | Actors ↔ Movies
Complex. Bidirectional ownership.
The parent points to children. Children point back to parent.
Can have many enrollments
Belong to one student
Ask yourself:
Relational databases do NOT allow many-to-many directly.
We need a secret weapon. Next week: The Junction Table.
"Measure twice, cut once."
The Blueprint
Planning & Design
Construction
Building & Implementation
"You don't start construction without a plan."
Learn the visual language. This is how database architects think.
Rectangle
Singular noun
STUDENT not
STUDENTS
Atomic values
No repeating groups
Inside
the rectangle
Underlined
Unique identifier
The DNA of
the row
Line with cardinality (1, N, M) connecting entities
Watch how entities connect through relationships.
Reading the diagram: One Student has many Enrollments. Each Enrollment is for one Course. Many Enrollments can point to the same Course.
⚠️ SQL will happily run on a bad design.
Your users will suffer later.
The consequence chain of poor design:
Update nightmares
Bad decisions
Production chaos
"Hours of planning save weeks of pain."
From chaos to civilization. Why the world runs on relational databases.
Why files failed and RDBMS conquered the world:
| Feature | Why It Matters |
|---|---|
| 📋 Tables | Structured reality. Entities modeled as they exist in the world. |
| 🎯 Keys | Identity. Every thing has a unique, unchanging DNA. |
| 🔗 Relationships | Truth. Connections mirror how reality actually works. |
| 🛡️ Constraints | Data correctness. Rules that prevent human error. |
| ⚡ Transactions | Safety. All-or-nothing operations protect data integrity. |
| 🔍 SQL | Standard access. Universal language for asking questions. |
"RDBMS exists because
data is more important than
code."
Data persists
Users depend on it
Truth matters
Excel fails
Reality captured
Relationships
Truth preserved
You now think in entities, keys, and relationships.
Welcome to the world of relational thinking.