Databases

From Codd's relational model to SQL, normalisation, transactions, indexes and NoSQL: how data is modelled, queried and kept correct under load.

Course · 8 lessons · 58 min

Taught inComputer ScienceData ScienceCybersecurity

  1. 1Why databases, and the relational modelFreeWhy files stop working once data is shared, and the 1970 idea that replaced them: relations, keys and the integrity rules a DBMS enforces.1960s–1970 · 7 min
  2. 2Entity-relationship modellingBefore writing CREATE TABLE, draw the world: entities, attributes, relationships and cardinalities, then map them to tables without losing meaning.1976 · 7 min
  3. 3SQL queries: SELECT to HAVINGHow a SELECT is evaluated, clause by clause: filtering rows with WHERE, grouping with GROUP BY, filtering groups with HAVING, and the traps of NULL.1974–today · 7 min
  4. 4JoinsInner, left, right, full and cross joins: what each returns, how NULLs appear, and the WHERE clause that quietly turns a left join into an inner one.1970–today · 7 min
  5. 5Normalisation: 1NF to BCNFFunctional dependencies, the anomalies they cause and the normal forms that remove them, with a table decomposed step by step to BCNF.1971–1974 · 8 min
  6. 6Transactions, ACID and isolationAll or nothing, and as if alone: what ACID promises, how a log makes it survive crashes, and which anomalies each isolation level allows.1981–1995 · 8 min
  7. 7Indexes and query plansWhy a B-tree finds one row among ten million in four page reads, what an index costs, and how to read the plan the optimiser chose.1972–today · 7 min
  8. 8NoSQL and when to use itKey-value, document, wide-column and graph stores, the CAP trade-off behind them, quorums, and how to decide between them and a relational database.2000–today · 7 min