Databases (DBMS)
Databases is a core GATE CS subject. These lessons go from the ER model and relational algebra to SQL, normal forms, transactions and B+ trees. Every SQL example runs on a real SQLite database when the site is built, so the result tables you see are exact, and the algorithms (attribute closure, candidate keys, serializability) come with small programs.
1Basics
2Relational Model
- Relational Model and KeysRelations, tuples and domains; superkeys, candidate, primary and foreign keys; counting superkeys; and integrity constraints.
- Relational AlgebraSelection, projection, set operations, Cartesian product, joins, outer joins and division, with result sizes and a small Python implementation.
- Relational CalculusTuple relational calculus with ∃ and ∀, safe expressions, domain calculus, and how calculus compares with relational algebra.
3SQL
4Database Design
- Functional DependenciesFunctional dependencies, Armstrong's axioms, attribute closure, finding all candidate keys, equivalence of FD sets and the minimal cover.
- NormalizationUpdate anomalies, 1NF, 2NF, 3NF and BCNF, lossless-join and dependency-preserving decompositions, and multivalued dependencies with 4NF.
5Transactions
- Transactions and SerializabilityACID properties, transaction states, schedules, conflict and view serializability with precedence graphs, and recoverable, cascadeless and strict schedules.
- Concurrency Control and RecoveryShared and exclusive locks, two-phase locking and its strict variants, deadlock prevention with wait-die and wound-wait, timestamp ordering with the Thomas write rule, and log-based recovery.