Introduction
The relational model is the foundation of almost every database you will meet in an exam or on the job: MySQL, PostgreSQL, Oracle, SQL Server, SQLite. It was proposed by Dr. E. F. Codd of IBM in 1970 (paper: A Relational Model of Data for Large Shared Data Banks). Instead of storing data in complicated linked structures, Codd's idea was breathtakingly simple: store all data in two-dimensional tables (relations) and manipulate them with a small, precise mathematical language.
For BCS, Bank IT, and IT-officer exams this topic is a goldmine because the questions are definitional and mechanical — "What is a candidate key?", "Which operation is σ?", "Degree vs cardinality?" — so once you master the vocabulary and the algebra symbols, you score full marks quickly. This lesson builds everything from first principles: what a relation really is, every kind of key, and the eight relational-algebra operations that SQL itself is built upon.
Learning Objectives
- Define a relation and its parts: attribute, tuple, domain, degree, cardinality.
- State and distinguish the relational integrity constraints (domain, key, entity, referential).
- Correctly identify super key, candidate key, primary key, alternate key, composite key, foreign key, surrogate key.
- Perform the fundamental relational-algebra operations: σ (select), π (project), ∪, −, ×, ρ, and the derived ones: ∩, ⋈ (join), ÷ (division).
- Compute the degree and cardinality of the result of any algebra expression.
- Translate simple English queries into relational algebra and avoid the classic exam traps.