Madhavan Mukund



RDBMS and SQL

Aug–Nov 2024


Administrative details

  • Instructor: Madhavan Mukund

  • Teaching Assistants: None

  • Evaluation:

    • Assignments, final exam

    • Weightage approximately 60%, 40%, to be confirmed

    • Copying is fatal

  • Text and reference books:


Course plan

This list is approximate and subject to change.

  • The relational model
    • History
    • Relational algebra
  • SQL
    • Basic queries
    • Creating and updating tables
    • Aggregate queries
  • Storing tables on disk
  • Query processing
  • Transactions and consistency


Lectures

  • Lecture 1: 8 Aug 2024
    (Class Notes)

    • Why DBMS? Overview of concepts to be discussed in the course
    • The relational model — mathematical relations, relations an d tables, schema
    • Reference: Silberschatz et al, Ch 1.1, 1.2, 1.6, 2.1, 2.2

    Supplementary reading

  • Lecture 2: 22 Aug 2024
    (Class Notes)

    • Relational algebra: select, project, join, set operations
    • Reference: Silberschatz et al, Ch 2.6
  • Lecture 3: 29 Aug 2024
    (Class Notes)

    • Relational algebra: set operations, assignment, renaming, examples, expressiveness
    • Reference: Silberschatz et al, Ch 2.6
  • Lecture 4: 10 Sep 2024
    (Class Notes)

    • Relation schema — keys, referential integrity, foreign keys, schema diagram
    • Introduction to SQL – table creation
    • Reference: Silberschatz et al, Ch 2.2, 2.3, 2.4, 3.1, 3.2
  • Lecture 5: 19 Sep 2024
    (Class Notes, SQL demo)

    • Data definition in SQL – creating and dropping tables, databases
    • Data manipulation in SQL – inserting, deleting, updating rows in tables
    • Querying data in SQL – select, project, join
    • Reference: Silberschatz et al, Ch 3.1, 3.2, 3.3
  • Lecture 6: 26 Sep 2024
    (Class Notes, SQL demo)

    • Querying data in SQL – set operations, aggregate operations, grouping, sorting output
    • Reference: Silberschatz et al, Ch 3.4.4, 3.5, 3.7
  • Lecture 7: 10 Oct 2024
    (Class Notes, SQL demo)

    • Querying data in SQL – string matching, nested queries, set membership and comparison, empty relations, null values, natural join
    • Reference: Silberschatz et al, Ch 3.6, 3.8, 4.1.1
  • Lecture 8: 17 Oct 2024
    (Class Notes)

    • Querying data in SQL – natural join, outer join, views
      • Reference: Silberschatz et al, Ch 4.1, 4.2
    • Relational database design: lossless decomposition, functional dependencies
      • Reference: Silberschatz et al, Ch 7.1, 7.2
  • Lecture 9: 22 Oct 2024
    (Class Notes)

    • Relational database design: redundancy, lossless decomposition, functional dependencies, normalization, BCNF, 3NF, closure
    • Reference: Silberschatz et al, Ch 7.1, 7.2, 7.3, 7.4.1, 7.4.2
  • Lecture 10: 29 Oct 2024
    (Class Notes)

    • Storage – RAM, disk, SSD; fixed and variable length records; heap and sequential organization of files
    • Reference: Silberschatz et al, Ch 12.1-12.4, 13.1-13.3
    • Indexing: motivation, clustering index, dense and sparse indices, secondary indices, B+-trees
    • Reference: Silberschatz et al, Ch 14.1-14.3
  • Lecture 11: 05 Nov 2024
    (Class Notes)

    • Query processing: query plans, assessing and optimizing cost, algorithms for selection, external merge sort, computing joins
    • Reference: Silberschatz et al, Ch 15.1-15.6
    • Query optimization: transforming relational algebra expressions, estimating outputs, choosing between evaluation plans
    • Reference: Silberschatz et al, Ch 16.1-16.4
  • Lecture 12: 07 Nov 2024
    (Class Notes)

    • Transactions: ACID properties, transaction state diagram, logs, concurrent schedules, serializability, conflict serializability, testing for conflict serializability, transactions in SQL, brief introduction to locks
    • Reference: Silberschatz et al, Ch 17.1-17.6, 17.8