SQL100% Active LaboratoryLAB
Database 8KB Slotted Page Physical Storage Lab
Deconstruct database disk page layout: Page Header, Item Pointer Line Array growing downward, Free Space Gap, and Tuple Row Payloads growing upward.
SQL • VISUALIZATIONVisual SQL Relational JOIN Laboratory
SQL • RELATIONAL ALGEBRACartesian Product & Key Matching
Visual SQL Relational JOIN Laboratory
Executing SQL Query:
SELECT s.id, s.name, s.major, e.course, e.grade FROM students s INNER JOIN enrollments e ON s.id = e.student_id;
Left Table:
students (s)| id (PK) | name | major |
|---|---|---|
| 1 | Aarav | CS |
| 2 | Diya | AI |
| 3 | Kabir | Data |
| 4 | Riya | Cyber |
Right Table:
enrollments (e)| student_id (FK) | course | grade |
|---|---|---|
| 1 | CS301 | A |
| 2 | CS301 | B+ |
| 2 | CS304 | A+ |
| 5 | CS305 | A |
Relational Result Set (3 rows returned)Matched by s.id = e.student_id
| s.id | s.name | s.major | e.course | e.grade |
|---|---|---|---|---|
| 1 | Aarav | CS | CS301 | A |
| 2 | Diya | AI | CS301 | B+ |
| 2 | Diya | AI | CS304 | A+ |
Relational Join Invariant:
In INNER JOIN: Only rows with matching keys in BOTH tables are preserved. Any unmatched student (like Kabir or Riya) or unmatched enrollment (like Student 5) is completely omitted.
Want a step-by-step breakdown from our 4 AI Engineering Agents?
Mastery Standard: Complete all 3 tasks in the Lab Protocol to earn verified mastery credits.
Study Full Unit Notes →