CS 471000 Introduction to Database Systems

Implementation, architectural design, and trade-offs.

Description

This course provides an overview of the current database management systems in the cloud, and explains how they are different from traditional database systems. The goal is to get students familiar with some well-known implementations like NoSQL databases, Google BigTable, Google MegaStore, and Google Spanner etc., and more importantly, to help students make better decisions on the design tradeoffs when configuring/building their own database systems given a particular set of target applications (tenants) in mind.

Proper understanding of Java/OOP programming and data structure is required.

Instructor

Teaching Assistants

Time & Location

  • Video Lecture: Update at Mon. 10am-12pm
  • Lab: Wed. 9-10am at Delta 106
  • Office hour: Wed. 10-12am at Delta 723

Grading Policy

  • Assignments (x5): 50%
  • Midterm exam: 25%
  • Final project : 25%

Prerequisits

This course is intended for senior undergraduate and junior graduate students who understand

  • OOP Programming,
  • Multi-threaded Programming,
  • Data Structure, and
  • Version Control.
We use Java as the main programming language throughout the course. Although not required, background knowledge about operating system will be helpful.

Announcement

Curriculum

If you have any feedback, feel free to contact: shwu [AT] cs.nthu.edu.tw

Lecture 00

Introduction

What's Database? | About This Course... | FAQ

Slides

Lecture 01

Using a DBMS

Main Features of a DBMS | Data Models | SQL Queries

Slides

General Rules For Assignments

The announcement the general rules for the assignments in this course and the introduction to the platform we use to manage assignments.

Slides

Introduction to Git

This lab guides you through the main idea of version control systems and the basic usage of Git.

Slides

Lecture 02

Data Modeling

ER & Relational Models | Weak Entities | Functional Dependencies | Normal Forms

Slides

Java Concurrency

Assigned Readings & Java Concurrency

Slides

Using VanillaDB

Basic tutorial of VanillaDB

Slides

Assignment 1

Given some scenario, design the ER model.

Solution GitLab

Lecture 03

Architecture and Interfaces

Architecture Overview | SQL | JDBC | Native Interface | RecordFile | MetaData

Video Slides

Introducing Benchmark Project

This lab guides you through the Benchmark Project

Slides

Explain Assignment 1

This lab explains how to decompose the table shown in Assignment 1.

Slides

Assignment 2

Implement JDBC version and Stored procedure Procedures version of Read/Write transaction in VanillaDB.

Solution GitLab

Lecture 04

Server and Threads

Introduction | Threads Processes | Supporting Concurrent Clients | Embedded Clients vs. Remote Clients | RMI | JDBC Implementation

Video Slides

VanillaCore Walkthrough Part 1

This lab guides you through the VanillaCore. (Server, Remote Access, Utilities)

Slides

Lecture 05

Query Processing

Overview | Parsing & Verification | Parser & SQL Data | Predicates | Predicates | Scans | Plans | Assignment

Video Slides

VanillaCore Walkthrough Part 2

This lab guides you through the VanillaCore. (Query Engine)

Slides

Assignment 3

Implement Explain SQL operation in VanillaDB.

Solution GitLab

Lecture 06

Data Access and File Management

Storage Engine | I/O Interfaces | Compromised File Management | Implementation: Page & FileMgr

Video Slides

Explain Assignment 2

This lab explains how to reach the requirement of assignment 2.

Slides

Lecture 07

Memory Management

Buffer Pools & Pinning | Buffer Replacement | Pool Size & Deadlock Handling | ACID & Logging | Caching Logs

Video Slides

VanillaCore Walkthrough Part 3

This lab guides you through the VanillaCore (File Access, Memory Management).

Slides

Assignment 4

Optimize file and buffer modules of VanillaCore.

GitLab Solution

Lecture 08

Record Management

Record Management | Design Considerations for Record Manager | The VanillaCore Record Manager

Video Slides

Lecture 09

Transaction Management

Overview of Transaction API | Schedules | Anomalies | 2PL & S2PL | Deadlock Handling | Assignment | Multi-Granularity Locking | Phantoms | Isolation Levels | Meta Structure | CC in VanillaCore

Video Slides

Assignment 5

Implement two version two phase locking protocol.

GitLab Slides

Lecture 10

Transaction Recovery

Recap: WAL | Physical Logging & Tx Rollbacks | Undo Recovery | Undo-Redo Recovery | Repeated Failures | Checkpointing

Video Slides

Explain Assignment 4

This lab briefly explains how we optimize buffer and file module for assignment 4.

Slides

ARIES overview

Algorithm and design choice of ARIES

Slides

Lecture 11

Indexing

Hash Indexing | B-Tree Indexing | Index Locking

Video Slides

Explain Assignment 5

Solution of assignment 5

Solution Slides

Final Project

Final Project

This final project tests whether you are capable to realize a research work on a DBMS.

Paper List GitLab Slides

Resources

Following provides links to some useful online resources. If this course starts your DB journey, don't stop here. Enroll yourself in advanced courses (shown below) to learn more.

Other Course Materials

For more course materials (such as assignments, score sheets, etc.) and online forum please refer to the GitLab.

GitLab

Documentation

Describes the API operations for the VanillaDB in detail.

Java Doc

Reference Books

  • Raghu Ramakrishnan et al., Database Management Systems, 3 Edition, McGraw-Hill, 2002, ISBN: 0072465638

  • Abraham Silberschatz et al, Database System Concepts, 6 Edition, McGraw-Hill, 2010, ISBN: 0073523321

  • Edward Sciore, Database Design and Implementation, Wiley, 2008, ISBN: 0471757160

  • M.Tamer Özsu, Principles of Distributed Database Systems, 3 Edition, Springer, 2011, ISBN: 1441988335

  • Rachid Guerraoui et al., Introduction to Reliable Distributed Programming, Springer, 2006, ISBN: 3540288457