Course · Intermediate

Database Management Systems

The full DBMS subject, from ER diagrams and keys to normal forms, transactions, concurrency, recovery, indexes and query processing, with every algorithm worked by hand and checked by code.

Level
Intermediate
Units
12 units, 56 lessons
Time
About 19 hours
Access
Unit 1 free, the rest with Pro
Practice
122 problems the judge checks
Certificate
Yes, anyone can verify it

What you will be able to do

  • Design a database as an ER diagram and turn it into correct tables with the right keys
  • Write relational algebra, relational calculus and SQL answers the way exam papers ask
  • Find closures, candidate keys and minimal covers, and normalise tables up to BCNF and 4NF
  • Decide whether a schedule is serialisable and recoverable, and explain how locks and timestamps keep it safe
  • Explain how logs, checkpoints and ARIES bring a database back after a crash
  • Work out block accesses, B+ tree sizes and join costs, and explain how a query optimiser picks a plan

Before you start: Basic SQL (the Faurus SQL course, units 1 to 7) and basic Python (Introduction to Computer Programming, units 1 to 8). The B-trees lesson of the DSA course helps for unit 11.

Syllabus

12 units, in order

  1. Unit 1Free

    Why databases

    What a database management system does that plain files cannot, how data is described in levels, and the languages and parts inside a DBMS.

    3 lessons · 54 min
  2. Unit 2

    ER modelling

    Draw a database before you build it: entities, attributes, relationships and their constraints, weak entities, extended ER, and turning a diagram into tables.

    5 lessons · 92 min
  3. Unit 3

    Relational model and keys

    The relational model in precise words: relations, tuples, domains, integrity constraints and every kind of key.

    4 lessons · 68 min
  4. Unit 4

    Relational algebra and calculus

    The mathematics under SQL: the algebra operators, joins, division for 'for all' questions, and relational calculus.

    5 lessons · 98 min
  5. Unit 5

    SQL in the theory exam

    SQL the way university papers ask for it: from algebra to SQL, nested and correlated queries, NULL logic, and privileges. The Faurus SQL course owns everyday SQL; this unit adds the exam angle.

    4 lessons · 84 min
  6. Unit 6

    Functional dependencies

    The rules hidden in data: functional dependencies, Armstrong's axioms, attribute closure, candidate keys and minimal covers.

    5 lessons · 104 min
  7. Unit 7

    Normal forms

    Why badly designed tables cause anomalies, and how normal forms from 1NF to 5NF fix them, with the decomposition tests exam papers ask for. This unit owns normal forms theory; the SQL course keeps a short SQL-side lesson.

    6 lessons · 144 min
  8. Unit 8

    Transactions and ACID

    What a transaction promises, how operations of many transactions interleave, and which interleavings are safe or recoverable. The SQL course owns BEGIN, COMMIT and ROLLBACK.

    5 lessons · 104 min
  9. Unit 9

    Concurrency control

    How a DBMS keeps interleaved transactions correct: locks and two-phase locking, deadlocks, timestamps, multiversion and optimistic methods, and isolation levels.

    6 lessons · 128 min
  10. Unit 10

    Recovery

    How a DBMS survives crashes: failure types, the log, undo and redo, checkpoints and the ARIES method.

    4 lessons · 82 min
  11. Unit 11

    Indexing and B+ trees

    How data sits on disk and how indexes find it fast: file organisation, index types, B+ trees and hashing. The DSA course owns the B-tree data structure; this unit applies it to disk.

    5 lessons · 116 min
  12. Unit 12

    Query processing

    What happens after you press run: parsing, the cost of selections and joins, and how an optimiser picks a plan.

    4 lessons · 96 min

How a course works

Short lessons. Real checks.

  1. Read a little

    A short explanation with an example, written for students, not for experts.

  2. Change it and run it

    Edit the example code in the lesson and run it to see what changes.

  3. Check, then solve

    A quick check, then practice problems the judge checks on hidden tests.

  4. Checkpoints and a final test

    Pass them to finish the course and get your certificate.

Database Management Systems, on a real judge.