Z2004 · BS Core · Even Semester Archive
Database Management Systems
Relational data modeling, ER design, relational algebra, SQL, normalization, storage pages, B+ tree indexing, ACID transactions, and modern NoSQL and vector retrieval systems, paired with tested SQLite/Python labs and a semester database project.
Schedule
| Session | Frequency | Details |
|---|---|---|
| Lecture | 3 per week | 50 min each |
| Tutorial | 1 per week | 50 min · SQL problem sets, schema design, and SQLite labs |
Lectures & Module Summaries (M1–M10)
| Module | Weeks | Topic | Slides & LaTeX Summaries |
|---|---|---|---|
| M1 | 1–2 | Foundations and Data Modelling: DBMS intro, ER model, weak entities, extended ER | L01 · L02 · L03 · L04 · L05 · L06 · M1–M2 Summary PDF |
| M2 | 3 | Relational Model: relations, schemas, keys, integrity constraints | L07 · L08 · L09 |
| M3 | 4–5 | Relational Algebra: selection, projection, join, set operations, division | L10 · L11 · L12 · L13 · L14 · M3 Summary PDF |
| M4 | 6–7 | SQL Foundations: DDL, DML, SELECT, WHERE, ORDER BY | L15 · L16 · L17 · M4–M6 Summary PDF |
| M5 | 8–9 | SQL Intermediate: aggregation, GROUP BY, joins, subqueries | L18 · L19 · L20 · L21 |
| M6 | 10 | SQL Advanced: CTEs, window functions, triggers, stored procedures | L24 · L25 · L26 |
| M7 | 11–12 | Normalization and FD Theory: functional dependencies, Armstrong's axioms, 1NF through BCNF, 4NF | L30 · L31 · L32 · L33 · M7 Summary PDF |
| M8 | 13 | Storage and Indexing: B-tree, hashing, heap files, buffer pool | L34 · L35 · L36 · L37 · L38 · M8 Summary PDF |
| M9 | 14 | Query Processing and Transactions: query pipeline, ACID, 2PL, recovery | L28 · L39 · L40 · L41 · M9–M10 Summary PDF |
| M10 | 15–17 | Modern and AI Data Systems: NoSQL, vector databases, embeddings, RAG pipelines, cloud databases | L42 · L43 · L44 · L45 (PDF) |
Additional reference documents: Course Schedule · SQL Reference · Project Guidelines · School DB DDL (.sql)
SQLite3, Python & SQL Reference Labs
Each module pairs an assertion-tested Python/SQLite3 script (code/) with an executed Google Colab notebook (labs/), or browse all snippets inline in the Z2004 Lab Explorer & SQLite3 Code Previews.
| Lab | Topics Covered | Code & Notebooks |
|---|---|---|
| Lab 1 | ER-to-Relational DDL, Foreign Keys & Cascade Constraints (SQL DDL) | Python (.py) Notebook (.ipynb) Colab ↗ |
| Lab 2 | Relational Algebra Engine: Select, Project, Natural Join & Division | Python (.py) Notebook (.ipynb) Colab ↗ |
| Lab 3 | Complex SQL Joins, Views, CTEs & Window Functions | Python (.py) Notebook (.ipynb) Colab ↗ |
| Lab 4 | Normalization: FD Closure, Candidate Keys & BCNF Checker | Python (.py) Notebook (.ipynb) Colab ↗ |
| Lab 5 | B+ Tree Range Scans & SQLite Query Plan Benchmarking | Python (.py) Notebook (.ipynb) Colab ↗ |
| Lab 6 | ACID Transactions, Rollback Atomicity & Conflict Serializability | Python (.py) Notebook (.ipynb) Colab ↗ |
| Lab 7 | Query Optimization, Join Algorithms (BNL, Sort-Merge, Grace Hash) & EXPLAIN Plans | Python (.py) Notebook (.ipynb) Colab ↗ |
| Lab 8 | NoSQL Document & Property Graph Patterns vs. SQLite JSON1 & Recursive CTE Parity | Python (.py) Notebook (.ipynb) Colab ↗ |
Grading
| Component | Weight | Details |
|---|---|---|
| Assignments (ICA) | 10% | Fortnightly SQL puzzles, schema sketches, think-pair-share. |
| Quiz 1 | 15% | Apr 16–17 · Covers M1 (ER), M2 (Relational Model), M3 (Relational Algebra). |
| Quiz 2 | 20% | May 28–29 · Covers M4–M6 (SQL Basics through Advanced). |
| Semester Project | 20% | RAG Pipeline or Recommendation Engine · Milestones throughout the semester · Final submission Jun 30, 2026. |
| End-semester examination | 35% | Jun 29 – Jul 3, 2026 · All modules with emphasis on M7–M10. |
Learning Outcomes
- Design and refine entity-relationship diagrams for real-world data requirements, and convert ER schemas to normalized relational schemas.
- Write relational algebra expressions for queries involving selection, projection, join, set operations, and division.
- Compose correct and efficient SQL queries using joins, subqueries, aggregation, window functions, CTEs, and stored procedures in SQL Server and PostgreSQL.
- Apply functional dependency theory and normalization through BCNF and 4NF to eliminate redundancy and anomalies.
- Explain how databases store data on disk, and describe B-tree and hash-based index structures and their effect on query performance.
- Describe the ACID properties of transactions and explain concurrency control (2PL) and crash recovery mechanisms.
- Compare relational, document, key-value, and vector database models, and implement a RAG pipeline over a vector database.
Resources
Practice & Self-Tests
Required Textbook
Database System Concepts (7th ed.) · Abraham Silberschatz, Henry Korth, S. Sudarshan · McGraw-Hill, 2019
Reference Textbook
Fundamentals of Database Systems (7th ed.) · Ramez Elmasri, Shamkant Navathe · Pearson, 2015
Reference Textbook
Learning SQL (3rd ed.) · Alan Beaulieu · O'Reilly, 2020
Database Software
Primary: SQL Server 2022 (Windows) or Azure SQL Edge (Docker). Secondary: PostgreSQL 16 and Python SQLite3.
Policies
Late work
Late work is not accepted. Deadlines are fixed and announced in advance; submit what you have by the deadline. No extensions.
Academic integrity
All SQL you submit must reflect your own understanding. Copying another student's queries or allowing your work to be copied is a violation. Using AI to generate SQL and submitting it without understanding is a violation; if you use AI as a debugging aid, declare it.
Attendance
Attendance at lectures and tutorials is expected. Tutorials include in-class activities that cannot be made up.