CSci 6370
Database Management

John Miller
Spring 2024


Textbook

Database System Concepts, Seventh Edition,
By Avi Silberschatz, Henry F. Korth and S. Sudarshan, 2019.

Alternative: Principles of Database Management: The Practical Guide to Storing, Managing and Analyzing Big and Small Data,
By Lemahieu, Wilfried; Vanden Broucke, Seppe; Baesens, Bart, 2018.

Alternative: Fundamentals of Database Systems, 7th Edition,
By Ramez Elmasri and Shamkant B. Navathe, 2016.


Class Time

Day Time Plan Room
Tuesday 11:10 - 12:25 Lecture + TT Environmental Health Sciences - room 101
Wednesday 11:30 - 12:20 Lecture Science Learning Center - room 345
Thursday 11:10 - 12:25 Lecture + HW Environmental Health Sciences - room 101


Course Description

A comprehensive course on the use and implementation of Database Management Systems (DBMSs).


Course Topics

SKS: Chapters 1 - 4, 6 - 7, 9 - 15.

Skip Chapters 5, 8


LBB: Chapters 1 - 4, 6 - 7, 9, 11 - 15.

Skip Chapters 5, 8, 10


EN: Chapters 1 - 9, 14 - 20, 24.


Sample Performance Analysis Table

Table Scan Successful N_R = #block reads
Case Exact Asymptotic
Best 1 O(1)
Expected (N_r + 1) / 2 O(N_r)
Worst N_r O(N_r)
Note: for relation r(R): n_r = #records, N_r = #blocks, S_r = record size, phi_r = blocking factor


Grading

20% Exam I: .
20% Exam II: .
25% Final Exam .
30% Programs (groups of 5) Java SE 21, MySQL Community 8.2, PostgreSQL 16.1
5% Homework/Tool Talks presentations
Exam I:
Review Date: .
Exam Date: .
5 Questions:
Q1:
Q2:
Q3:
Q4:
Q5:

Exam II:
Review Date:
Exam Date:
5 Questions:
Q1:
Q2:
Q3:
Q4:
Q5:

Final Exam:
Date: .
5 Questions
Q1:
Q2:
Q3:
Q4:
Q5:


HW: Homework (in pairs)

Requirement: Present 1 (in pairs). Subject to rescheduling.
No. Chapters Questions Due
1. Ch. 1 (1) History to RDBMS; (2) After RDBMS; (3) FMS vs. DBMS .
2. Ch. 2 (4) 2.2; (5) 2.9; (6) 2.14 .
3. Ch. 8 (7) 8.16 a-c; (8) 8.16 d-f; (9) 8.16 g-i .
4. Ch. 16 (10) SATA/SAS; (11) RAID; (12) SSD .
5. Ch. 17 (13) 17.18; (14) 17.19; (15) 17.27; (16) 16.40 .
6. Chs. 18, 6 (17) 18.13; (18) 6.5; (19) 6.9 .
7. Ch. 6 (20) 6.10; (21) 6.12; (22) 6.15 .
8. Ch. 3 (23) 3.21 in UML; (24) 3.22 in UML; (25) 4.20 in UML .
9. Ch. 14 (26) 14.24; (27) 14.28; (28) 14.30 .
10. Ch. 15 (29) 15.29 BCNF; (30) 15.29 3NF; (31) Compare 3NF and BCNF .
11. Additional HW Per Request


TT: Tool Talks (group)

Introduce technology, how to install and how to use. Students should follow along using their laptops.

Requirement: Present 1 (group). Email slides to TA. Subject to rescheduling.

No. Topic Description Talk Due
1. Java Functional Programming in Java 21 . .
2. I/O Streams ; File I/O I/O Streams; File I/O in Java . .
3. MySQL 8.2 Relational Database Management System (R-DBMS) [Data Types] . .
4. PostgreSQL 16.1 Object-Relational Database Management System DBMS (OR-DBMS) . .
5. JDBC Java Database Connectivity (JDBC) - also see Code Samples . .
6. Play 3 Web Application Framework . .
7. Ebeans Ebeans - Simple ORM . .
8. UML Unified Modeling Language - Class Diagrams for Database Design . .
9. NoSQL NoSQL Databases . .
10. MongoDB MongoDB NoSQL Databases . .
11. Security Database Security . .
12. Password Security Password Security: Salted Hash Functions . .


Projects

READ Instructions

Must Extend the Code Given Below: (TA will ensure this by looking for changes from prior versions)

No. Description Starter Code (must be used) Comment Due
1. Implement RA Operators: Select, Project, Union, Minus and Join Table.java, KeyType.java, ArrayUtil.java and MovieDB.java Finish the implementation the 5 RA Operators that are partially implemented in Table.java. Store tuples in an ArrayList. Use MapType.NO_MAP for the index type (no indexing). .
2. Implement the following Index Structure: LinHashMap.java Use indices (TreeMap, HashMap (in Java) and LinHashMap) to speed up the processing of Select and Join. Indices must be integrated and used in the Table class. For a bonus of up to (+10) provide the option of storing the tuples in a FileList as well as in an ArrayList. .
3. Performance Evaluation of RA Operators TupleGenerator.java, TupleGeneratorImpl.java, TestTupleGenerator.java Plot performance for Selects and Joins (response time in ms vs. number of tuples). Compare sequential select vs. indexed select. Compare nested loop join vs. indexed join. Compare the three types of maps/indices (TreeMap, HashMap, and LinHashMap). Print your Index Structure. TA to overview performance results. Gold (+6), silver (+4) and bronze (+2) medals for best performers. .
4. Performance Tuning of SQL Queries See queries below Analyze query plans generated by the DBMS. Tune queries by using hints, adding indexes and rewriting queries. Explain how query plans change after tuning. Turn in before and after .sql files and query plans for six queries (given in English, see below). Do this for both the MySQL and PostgreSQL DBMSs: MySQL and PostgreSQL . Present tuning experience and performance results including plots. .
5. Term Project: Database Application with Web Access . A two-page proposal giving a detailed description of the application you propose to develop must be submitted with project 3. Proposal must indicate Web Framework (Spring Boot or Play 3 unless permission), JDBC or Ebeans, Database (MySQL or PostgreSQL, unless permission). Project includes database design (UML Class Diagram, 3NF/BCNF Normalization), population and Web-based application development. The Web development framework is Spring Boot or Play 3. The term project including a demo will be presented during the last week of class. Worth twice the points of regular programming projects. .

Plots with error bars of Performance Results for Project 3:

  1. Select - Point Query: e.g., σ id = v (Student)
  2. Select - Range Query: e.g., σ v1 <= id & id <= v2 (Student)
  3. Join: e.g., Student join id = studId Transcript

Queries for Project 4:

  1. List the name of the student with id equal to v1 (id).
  2. List the names of students with id in the range of v2 (id) to v3 (inclusive).
  3. List the names of students who have taken course v4 (crsCode).
  4. List the names of students who have taken a course taught by professor v5 (name).
  5. List the names of students who have taken a course from department v6 (deptId), but not v7.
  6. List the names of students who have taken all courses offered by department v8 (deptId).

Rubric for Final Presentations:

  1. Design Schema 1 using a UML Class Diagram
  2. Translate UML to Relational Model
  3. Design Schema 2 using the Boyce-Codd Normal Form (BCNF) Decomposition Algorithm
  4. Design Schema 3 using the Third Normal Form (3NF) Synthesis Algorithm
  5. Compare the three designs
  6. Show final schema in SQL and explain constraints
  7. Discuss Software Architecture and Components
  8. Demo Secure Logins (password handling and SQL injection prevention)
  9. Demo Database Queries
  10. Demo Database Updates and Transactions


Policies