CompSci 316 - Introduction to Databases -Fall 2022 (original) (raw)

Alex Chao

Grad TAs

Yuxi Liu, Zhe Wang, Haibo Xiu, and (half-TAs) Tong Lin and Fiona (Chengyu) Wu

UTAs

Konstantinos Bailas, Samy Boutouis, Neel Gajjar, Joshua Guo, Alexandra Lawrence, Joon Young Lee, Justin Lim, Danny Luo, Alok Malhotra, Harris Masterson, Jason Qiu, Alex Schiff, Grace Tian, Joyce Wang Samia Zaman, Han Zhang, Zachary Zheng.Not sure who your TAs are? Check out first few slides of Lecture 1

Weekly Office Hour Calendar:

See Ed for the calendar.

Grading

You have a considerable amount of control over the final grade you would receive in this class if you work hard, and should have a fair idea where you approximately stand at any point of time!

### Weights of each component:

See details in Workload below.

| Component | Weight | | --------------------------------------------------------------------- | ------ | | Homeworks | 34% | | Written problem solving /programming | 25% | | Gradiance exercises (2 lowest score dropped) | 9% | | Exams | 35% | | Midterm | 17% | | Final exam | 18% | | Project | 24% | | Class participation | 7% | | Attending discussion sessions (quizzes and collaboration) | 5% | | Communication | 2% | | Extra Credit (above 100%) | 2% | | Extra credit problems from HW and Exams (lowest 1/4th scores dropped) | 2% |

## Workload

Note: Almost all types of assignments have options for late days or removal of some lowest scores. To ensure fairness to everyone, no additional late days would be granted by email requests before the deadline. Please start early!

How much time should I allocate to get work done in CompSci 316?

You should plan for the following every week. You should approximately allocate 8-12 hours every week for the class, although it may vary from student to student.

Activity Hours/Week Days of Weeks
In-person lectures 1.25 x 2 = 2.5 Tues, Thurs
Discussion session 1.25 Fri
Assignments 2-5 (varies) varies, typically not Friday or weekend!
Project 2-4 (heavier work likely later in the course, if you do an "open project", expect 1.5x or so more work (and more fun!)) Mon (weekly updates) + Two milestones and a final project submission

Resources / Communication / Toolkits

Book: If you would like to consult a textbook, we primarily use the following book: Database Systems: The Complete Book, by Hector Garcia-Molina, Jeffrey D. Ullman, and Jennifer Widom. 2nd Edition. Prentice Hall. 2008.

See the publisher's book page and the Amazon book page. Relevant chapters for reading are posted under Schedule. In a typical semester, textbooks for this course are available for 3-hour checkouts at the Duke Libraries. Search the Libraries' Top Textbooks program here: https://library.duke.edu/course-support/course-reserves/textbooks. Please consult the library for options during the COVID-19 situation.

Gradescope: We will use Gradescope (for submission and grading of (non-Gradiance) homeworks and project work, as well as grading of exams. Communication and Ed: You should check Ed regularly for important course-related announcements. Important announcements will be also sent through Sakai and in class lectures.

All questions that may be of general interest to the class should be directed to Ed. You will get your questions answered faster on Ed than via personal emails to the course staff (who will direct you to Ed), because Ed is monitored closely by everybody in the class, not just the course staff. You are highly encouraged to answer each others' questions on Ed and the course staff would endorse/add to those answers. Only for logistics-related issues, email both Sudeepa and Alex.

Sakai: We will use the Sakai course management system for posting sample solutions (under "Resources") and for checking grades (under "Gradebook").Computing: You will need access to a computer (any major OS will do) on which you are allowed to install new software. We will also use cloud-based virtual machines - see Help for details.

Course Policy

Standards of Conduct: Under the Duke Community Standard, you are expected to submit your own work in this course, including homeworks, projects, and exams.

Help

The help section will be updated when the class starts.

Schedule

(subject to change) "Notes" will be uploaded before the class and are intentionally left incomplete for interactive lectures. Completed "slides" will be uploaded after the lectures. Chapters for optional reading will be updated after the lectures.

D = Discussion session

A = Assignments

-->

| | Day | Topic | Slides | Assignments / Remarks | Optional Reading | | | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- | ------------------ | | 1 | 8/30 (T) | Introduction | Lecture-1 | | 2.1, 2.2, 6.1, 6.2 | | 2 | 9/1 (Th) | Relational model, Basic SQL, and Relational Algebra (RA) | Lecture-2 (up to slide 34) | | 2.3, 2.4 | | D1 | 9/2 (F) | VM Setup and basic SQL + RA | Discussion-1-sol (up to 2nd RA) | | | | A | None due | | | | | | 3 | 9/6 (T) | RA contd. + Database design in E/R modelGuest Lecture by Dr. Amir Gilad | Lecture-3 | 4.1-4.4 | | | 4 | 9/8 (Th) | Database design: E/R-relational translationGuest Lecture by Prof. Jun Yang | Lecture-4 | | 4.5-4.6 | | D2 | 9/9 (F) | More RA; Part of HW-1 (RA) solving | Discussion-2 | | | | A | Gradiance-1 due on 9/14 Wednesday 10 pm (no extension/late days) HW-1 (RA) due on 9/15 Thursday 10 pm (see late policy above) MS1 - Names of members for each team due on 9/16 Friday 5 pm, gradescope group assignment | | | | | | 5 | 9/13 (T) | SQL: aggregation, subqueries, NULL, outerjoin, modifications, constraints, triggers, views | Lecture-5 (up to slide 26) | 2.3, 6.1.1-6.1.7, 6.2-6.5, 7.1-7.5, 8.1-8.3 | | | 6 | 9/15 (Th) | contd. | (up to slide 55) | | | | D3 | 9/16 (F) | ERD & iREX tool for SQL | Discussion-3 | | | | A | Gradiance-2 (ERD) due on 9/21 Wednesday 10 pm HW-2 (ERD) due on 9/22 Thursday 10 pm | | | | | | 7 | 9/20 (T) | Project mixer : guest lecture by Danai Adkisson (OIT) on project setup | Slides from CoLab | | | | 8 | 9/22 (Th) | SQL contd. | | | | | D4 | 9/23 (F) | Part of SQL HW-3 solving with iRex | Discussion-4 | | | | A | Gradiance-3 (SQL & NULL) due on 9/28 Wednesday 10 pm HW-3 (SQL) due on 9/29 Thursday 10 pm | | | | | | 9 | 9/27 (T) | Database design theory: FD, BCNF | Lecture-6 (up to slide 19) | 3.1-3.4, 3.6, 3.7 | | | 10 | 9/29 (Th) | SQL recursion | | | | | D5 | 9/30 (F) | Midterm practice problems | [Midterm Review](Discuss/Midterm Review.pdf) | | | | A | NO GRADIANCE DUE NO HOMEWORK DUE | | | | | | 11 | 10/4 (T) | Midterm in class (syllabus: everything covered until and including 9/29) | | 9.1, 9.3, 9.4, 9.6, 10.2 | | | 12 | 10/6 (Th) | SQL programming Storage & Index | Lecture-5a Lecture-7a (storage) (up to slide 11 - to be contd.) Lecture-7b (index) (up to slide 12) | | | | D6 | 10/7 (F) | Git Tutorial and Project Work | [Discussion 6](Discuss/CompSci 316 Discussion 6 Fall 2022.pdf) | | | | A | Project MS-2 due on 10/13 Thursday 10 pm | | | | | | 10/11 (T) | Fall break - no class | | | | | | 13 | 10/13 (Th) | Index contd. | (Lec 7b up to slide 25) | 14.1, 14.2 | | | D7 | 10/14 (F) | Project & HW4 | [Discussion 7](Discuss/Discussion 7 .pdf) | | | | A | Mid-semester feedback survey due on 10/21 Friday 11:59 pm (part of communication 2%) | | | | | | 14 | 10/18 (T) | contd. | (finished Lec-7b) | | | | 15 | 10/20 (Th) | XML | Lecture-8 | | | | D8 | 10/21 (F) | Project & HW4 | [Discussion 8](Discuss/Discussion 8.pdf) | | | | A | HW-4 (mini project) group submission per project team due on 10/24 Monday 10 pm Gradiance-4 (B+-trees) due on 10/26 Wednesday 10 pm | | | | | | 16 | 10/25 (T) | XML contd. | End of Lecture 8 Storage Lecture 7a resumed | 12.1-12.2 | | | 17 | 10/27 (Th) | Storage Contd. | 13.1-13.5 | | | | D9 | 10/28 (F) | Index & XML | Discussion 9 | | | | A | Gradiance 5 (XML) due on 11/2 Wednesday 10 pm HW-5 (Index + XML) due on 11/3 Thursday 10 pm | | | | | | 18 | 11/1 (T) | External sorting and Join Processing | Lecture-9 (up to slide 18) | 15.1-15.6, 15.8 | | | 19 | 11/3 (Th) | Contd. | | | | | D10 | 11/4 (F) | Sorting and Join | Discussion 10 | | | | A | Project MS-3 due on 11/10 Thursday 10 pm NO HOMEWORK DUE NO GRADIANCE DUE | | | | | | 20 | 11/8 (T) | Query Optimization | Lecture-10 (up to slide 26) | 16.1-16.7 | | | 21 | 11/10 (Th) | NoSQL: JSON and MongoDB | Lecture-11 | MongoDB Help | | | D11 | 11/11 (F) | MongoDB & JSON | Discussion 11 | | | | A | Gradiance 6 (Query Processing) due on 11/18 Friday 5 pm (NOTE THE NON-STANDARD DATE AND TIME - Can be submitted by Monday 11/21 10 pm w/o late penalty) HW-6 (Sorting + Query Processing + JSON) due on Nov 19 Saturday 10 pm | | | | | | 22 | 11/15 (T) | Transaction - Basics and Concurrency Control | Lecture-12 (up to slide 30) | | | | 23 | 11/17 (Th) | Contd. | Finished Lecture 12 | | | | D12 | 11/18 (F) | Concurrency Control; Help on HW6 | Discussion 12 | | | | A | NOTHING DUE | | | | | | 24 | 11/22 (T) | Transactions Recovery | Lecture-13 (Up to slide 27) | | | | 11/24 (Th) | Thanksgiving break - no class | | | | | | 11/25 (F) | Thanksgiving break - no discussion | | | | | | A | TBD | | | | | | 25 | 11/29 (T) | Contd. | | | | | 26 | 12/1 (Th) | SQL Recursion | Lecture-14 | | | | D13 | 12/2 (F) | Practice problems for final | | | | | A | No assignments, final project report and demo with the TAs are due in this week - details TBA | | | | | | 27 | 12/6 (T) | Map-Reduce, Parallel DBMS | Lecture-15 | | | | 28 | 12/8 (Th) | Early in-class project presentations & Review | Lecture-16 | | | | D14 | 12/9 (F) | Project presentations | | | | | 12/17 (Sun) | Final Exam in class, 7-10 pm | | | | |