- ES Español

- EN English

5.28. Databases II (Mandatory)
- Semester: 5th Sem. Credits: 3
- Hour of this course: Theory: 1 hours; Practice: 2 hours; Laboratory: 2 hours;
- Syllabus:
- htmlonly

Español

English - Prerrequisites:
- CS271 Data Management (4th Sem) itemize
5.28.1. Justification ↑ Back to top
This course is a continuation of Data Management I, focusing on the internal mechanisms of database management systems (DBMS) and modern database technologies. It covers query optimization, indexing structures, and transactional integrity in depth. Additionally, it introduces students to non-relational models (NoSQL) and distributed architectures, which are essential for handling large-scale data in contemporary cloud environments.
5.28.2. Generales Goals ↑ Back to top
- Understand the internal storage structures and indexing techniques.
- Analyze and optimize query execution plans.
- Comprehend advanced transaction protocols and recovery mechanisms.
- Evaluate and implement solutions using NoSQL database models.
- Understand the principles of distributed and parallel databases.
5.28.3. Contribution to Outcomes ↑ Back to top
- AG-C08) Problem Analysis: Identifies, formulates, and analyzes complex computing problems. (Usage)
- AG-C12) Applies computer science theory and software development fundamentals to produce computer-based solutions. (Usage)
5.28.4. Content ↑ Back to top
5.28.4.1. Query Processing (12 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Silberschatz et al., 2019; Ramakrishnan and Gehrke, 2003)
Topics
- Page structures
- Index structures:
- B+ trees
- Hash indices: static and dynamic
- Index creation in SQL enumerate
- File structures:
- Heap files
- Hash files enumerate
- Algorithms for query operators:
- External Sorting
- Selection
- Projection; with and without duplicate elimination
- Natural Joins: Nested loop, Sort-merge, Hash join
- Analysis of algorithm efficiency enumerate
- Query transformations
- Query optimization:
- Access paths
- Query plan construction
- Selectivity estimation
- Index-only plans enumerate
- Parallel Query Processing (e.g., parallel scan, parallel join, parallel aggregation)
- Database tuning/performance:
- Index selection
- Impact of indices on query performance
- Denormalization enumerate
Learning Outcomes
- Describe the purpose and organization of both B+ tree and hash index structures [Describe]
- Compose an SQL command to create an index (any kind) [Compose]
- Specify the steps for the various query operator algorithms: external sorting, projection with duplicate elimination, sort-merge join, hash-join, block nested-loop join [Analyze]
- Derive the run-time (in I/O requests) for each of the above algorithms [Analyze]
- Transform a query in relational algebra to its equivalent appropriate for a left-deep, pipelined execution [Redesign]
- Compute selectivity estimates for a given selection and/or join operation [Compute]
- Describe how to modify an index structure to facilitate an index-only operation for a given relation [Describe]
- For a given scenario decide on which indices to support for the efficient execution of a set of queries [Assess]
- Describe how DBMSs leverage parallelism to speed up query processing by dividing the work across multiple processors or nodes [Describe]
5.28.4.2. DBMS Internals (12 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Silberschatz et al., 2019; Garcia-Molina et al., 2008)
Topics
- DB Buffer Management
- Transaction Management:
- Isolation Levels
- ACID
- Serializability
- Distributed Transactions enumerate
- Concurrency Control:
- 2-Phase Locking
- Deadlocks handling strategies
- Quorum-based consistency models enumerate
- Recovery Manager:
- Relation with Buffer Manager enumerate
- Concurrency Control:
- Optimistic concurrency control
- Timestamp concurrency control enumerate
- Recovery Manager:
- Write-Ahead logging
- ARIES recovery system (Analysis, REDO, UNDO) enumerate
Learning Outcomes
- Describe how a DBMS manages its Buffer Pool [Describe]
- Describe the four properties for a correct transaction manager [Describe]
- Outline the principle of serializability [Outline]
5.28.4.3. Distributed Databases/Cloud Computing (12 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Silberschatz et al., 2019; Özsu and Valduriez, 2020)
Topics
- Distributed DBMS:
- Distributed data storage
- Distributed query processing
- Distributed transaction model
- Homogeneous and heterogeneous solutions
- Client-server distributed databases enumerate
- Parallel DBMS:
- Parallel DBMS architectures: shared memory, shared disk, shared nothing
- Speedup and scale-up, e.g., use of the MapReduce processing model
- Data replication and weak consistency models enumerate
Learning Outcomes
- Describe the key components of a distributed DBMS, including distributed data storage, query processing, and transaction management [Describe]
- Analyze the tradeoffs between parallel DBMS architectures: shared memory, shared disk, and shared nothing [Analyze]
- Describe data replication strategies and weak consistency models in distributed database systems [Describe]
5.28.4.4. NoSQL Systems (12 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Sadalage and Fowler, 2012; Kleppmann, 2017a)
Topics
- Why NoSQL? (e.g., Impedance mismatch between Application [CRUD] and RDBMS)
- Key-Value and Document data model
- Storage systems (e.g., Key-Value systems, Data Lakes)
- Distribution Models (Sharding and Replication)
- Graph Databases
- Consistency Models (Update and Read, Quorum consistency, CAP theorem)
- Processing model (e.g., Map-Reduce, multi-stage map-reduce, incremental map-reduce)
- Case Studies: Cloud storage system (e.g., S3); Graph databases; "When not to use NoSQL"
Learning Outcomes
- Develop a use case for the use of NoSQL over RDBMS [Create]
- Describe the defining characteristics behind Key-Value and Document-based data models [Describe]
5.28.4.5. Semi-structured and Unstructured Databases (12 hours) [Skills AG-C08,AG-C12] ↑ Back to top
Bibliography: (Kleppmann, 2017a; Manning et al., 2008; Mikolov et al., 2013; Agrawal et al., 2023; MongoDB, Inc., 2025)
Topics
- Vectorized unstructured data (text, video, audio, etc.) and vector storage:
- TF-IDF Vectorizer with ngram
- Word2Vec
- Array database or array data type handling enumerate
- Semi-structured databases (e.g., JSON):
- Storage:
- Encoding and compression of nested data types enumerate
- Indexing:
- Btree, skip index, Bloom filter
- Inverted index and bitmap compression
- Space filling curve indexing for semi-structured geo-data enumerate
- Query processing for OLTP and OLAP use cases:
- Insert, Select, update/delete tradeoffs
- Case studies on Postgres/JSON, MongoDB, and Snowflake/JSON enumerate enumerate
Learning Outcomes
- Describe vectorized representations of unstructured data (e.g., TF-IDF, Word2Vec) and their storage models [Describe]
- Apply indexing techniques (e.g., B-tree, inverted index, Bloom filter) to semi-structured data stored in JSON format [Apply]
- Analyze query processing tradeoffs for semi-structured databases in OLTP and OLAP use cases [Analyze]
5.28.5. Bibliography ↑ Back to top
Silberschatz, A., Korth, H. F., and Sudarshan, S. (2019). Database System Concepts. McGraw-Hill, 7th edition.
Ramakrishnan, R. and Gehrke, J. (2003). Database Management Systems. McGraw-Hill, 3rd edition.
Garcia-Molina, H., Ullman, J. D., and Widom, J. (2008). Database Systems: The Complete Book. Pearson, 2nd edition.
Özsu, M. T. and Valduriez, P. (2020). Principles of Distributed Database Systems. Springer, 4th edition.
Sadalage, P. J. and Fowler, M. (2012). NoSQL Distilled: A Brief Guide to the Emerging World of Polyglot Persistence. Addison-Wesley.
Kleppmann, M. (2017a). Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems. O'Reilly Media.
Manning, C. D., Raghavan, P., and Schütze, H. (2008). Introduction to Information Retrieval. Cambridge University Press.
Mikolov, T., Chen, K., Corrado, G., and Dean, J. (2013). Efficient estimation of word representations in vector space. arXiv preprint. arXiv:1301.3781.
Agrawal, D. et al. (2023). Toward a systems architecture for ai-enabled applications. Communications of the ACM, 66(6):54–63.
MongoDB, Inc. (2025). Mongodb manual. MongoDB, Inc. https://www.mongodb.com/docs/.