CS-MI-T-3 · CS-MI-P-3 · SEMESTER III · MySQL

DBMS Study Hub

Class notes, diagrams, quizzes and exam quick points for the whole DBMS course. Pick a unit, then follow its days in order. New units are added here as they are taught.

Semester III · Version 1.1 · 25 October 2026
-- COURSE PLAN · START HERE

Welcome to DBMS

Theory: 40 classesLab: 20 sessionsLab DBMS: MySQL 8

How to use this hub

1 · FIND YOUR CLASS

Tap a unit button at the top, then a day. Or tap any class in the plan below to open its notes.

2 · READ THE NOTES

Read the day's notes before or right after class. Diagrams that look cut off on a phone scroll sideways.

3 · TAKE THE QUIZ

Answer without looking back. Each answer explains why; re-read only the parts you got wrong.

4 · REVISE FOR EXAMS

Copy the amber Exam quick points into a revision notebook and answer the homework questions in your own words.

5 · PRACTISE SQL

Open the SQL Lab before every lab session: try the examples, then solve that session's exercises.

6 · FOUND A MISTAKE?

Tell your teacher. Corrections and new units appear at this same link.

Good to know
  • Your SQL Lab progress and last open tab are saved in this browser only.
  • The page follows your phone's light or dark mode.
  • To jump straight to a day, add #day7 (or any day number) to the end of the link.
Each day contains
  • Learning goals and a recap
  • Notes with diagrams and College database examples
  • Common mistakes
  • Exam quick points
  • A quiz and homework questions

The running example: College database

These four tables appear in every unit, in class notes, quizzes and the lab, so the examples build on each other.

TableColumns (key underlined in class)Meaning
Departmentdept_id, dept_name, hodOne row per department
Studentroll_no, name, dept_id, semester, emailEach student belongs to one department
Coursecourse_id, title, credits, dept_idA department offers many courses
Enrollmentroll_no, course_id, semester, gradeLinks students and courses (many-to-many)

Theory plan, class by class

Tap a class to open its notes. Classes without a link are coming soon.

DayTopics
Unit I — Introduction to DBMS
D1File-processing system vs DBMS; advantages and disadvantages; client–server architecture
D2Data vs information; database, DBMS; database users and DBA; data models
D3Database languages (DDL, DML, DCL, TCL); schema vs instance
D4Three-schema architecture; mappings; logical and physical data independence
D5Unit I revision, diagram practice, 10-question test
Unit II — ER Modelling
D6Entities, entity sets; attribute types (simple/composite, single/multi-valued, derived, NULL)
D7Keys: super key, candidate key, primary key, alternate key, foreign key
D8Relationship sets, degree; constraints: cardinality ratio (1:1, 1:N, M:N) and participation
D9ER diagram notation; drawing the full College ER diagram; weak entity sets
D10Extended ER: specialization, generalization, aggregation; unit quiz
Unit III — Relational Data Model
D11Structure: relation, tuple, attribute, domain, degree, cardinality; ER-to-table mapping
D12Relational algebra: select, project, rename, union, set difference, Cartesian product
D13Relational algebra: intersection, joins (theta, equi, natural), division
D14Relational calculus: tuple (TRC) and domain (DRC); safety of expressions
D15Extended algebra: generalized projection, aggregation, outer joins; unit quiz
Unit IV — SQL and Integrity Constraints
D16SQL DDL and DML in depth; data types; integrity constraints
D17Set operations; aggregate functions; GROUP BY/HAVING; NULL values and three-valued logic
D18Nested and correlated queries; views
D19Assertions; stored procedures; triggers
D20Database security: GRANT/REVOKE, roles, SQL injection; unit quiz
Unit V — Relational Database Design
D21Anomalies; functional dependencies; Armstrong's axioms
D22Attribute closure; finding candidate keys; canonical cover
D23Decomposition: lossless join and dependency preservation
D241NF and 2NF with College examples
D253NF and BCNF
D26Multivalued dependency and 4NF; join dependency and 5NF
D27Normalization problem practice; unit test
Unit VI — Internals of RDBMS
D28Physical data structures; steps of query processing
D29Query optimization (heuristic and cost-based); cost estimation
D30Join algorithms: nested-loop, block nested-loop, indexed, sort-merge, hash join
Unit VII — Transaction Processing
D31Transactions; ACID properties; transaction states
D32Serial and non-serial schedules; conflict serializability; precedence graph
D33View serializability; recoverable and cascadeless schedules; concurrency control
D34Locking protocols (2PL, strict 2PL); timestamp ordering; deadlocks
D35Recovery: log-based recovery, undo/redo; checkpoints
Unit VIII — File Structure and Indexing
D36File organization: heap, sequential, hashed
D37Indexing: dense and sparse; primary, clustering and secondary indexes
D38Multilevel indexing
D39B-trees: structure, search, insertion
D40B+ trees; B-tree vs B+ tree; full-course revision

Lab plan: 20 sessions (MySQL)

Related experiments are grouped into 20 lab sessions. Students can practise every session at home in the SQL Lab, which has a browser SQL editor and 38 checked exercises.

LabPractical workRuns alongside
L1MySQL setup; CREATE DATABASE, USE, CREATE TABLE; data typesUnit I · D3
L2Constraints: PRIMARY KEY, FOREIGN KEY, NOT NULL, UNIQUE, CHECK, DEFAULTUnit II
L3INSERT, UPDATE, DELETE; ALTER and DROPUnit II
L4SELECT with WHERE; comparison and logical operators; BETWEEN, IN, LIKE, IS NULLUnit III · D12
L5ORDER BY, DISTINCT, LIMIT; column aliasesUnit III
L6Aggregate functions: COUNT, SUM, AVG, MIN, MAXUnit III · D15
L7GROUP BY and HAVINGUnit IV · D17
L8Set operations: UNION, UNION ALL; INTERSECT and EXCEPT (MySQL 8.0.31+)Unit IV · D17
L9Inner join, natural join, self joinUnit IV
L10LEFT and RIGHT outer joins; full outer join using UNION (MySQL has no FULL JOIN)Unit IV
L11Nested subqueries with IN, ANY, ALLUnit IV · D18
L12Correlated subqueries; EXISTS and NOT EXISTSUnit IV · D18
L13Views: create, query, update through a view, dropUnit IV · D18
L14Stored procedures (DELIMITER, IN/OUT parameters)Unit IV · D19
L15Triggers: BEFORE/AFTER INSERT and UPDATEUnit IV · D19
L16Users and privileges: CREATE USER, GRANT, REVOKEUnit IV · D20
L17Normalization exercise: split an unnormalized table into 3NF tables in MySQLUnit V
L18Transactions: START TRANSACTION, COMMIT, ROLLBACK, SAVEPOINT; autocommitUnit VII
L19Indexes: CREATE INDEX, EXPLAIN a query before and afterUnit VI / VIII
L20Integrated College database exercise; lab exam practiceRevision