Announcements

  • "Homework 8" posted to course schedule. It is not due, but some practice problems to help you review course material covered since Quiz 3.

  • Quiz 4 Review Session: Monday Dec. 7 11am - noon

  • Office Hours week of Dec. 7

    • Tues: 10-11am

    • Wed: noon-1pm

  • Quiz 4, in 2 Parts, each same format as other quizes: starts Thurs. Dec. 10, 9am ends Friday Dec. 11 9am.

    • Part 1 focuses on material since Quiz 3, and contains depth on just this material.  

    • Part 2 is course-wide material (which also includes material since quiz 3).

Class announcements will be posted here and/or sent as email. You are expected to check your email frequently for class announcements. Questions and answers about assignments should be posted on Piazza. All assignments are posted to the class Class Schedule.

Class Info

Professors: Tia Newhall, Ameet Soni

Class: TR 11:45am-1:00pm, hosted on Zoom.

Office hours: in the CS44 Slack workspace (in the #office-hours channel). All times are Eastern time zone.

Lab:

Lab Section A

Newhall

Wednesday 1:15 - 2:45

start on zoom, move to slack

Lab Section B

Newhall

Wednesday 3:00 - 4:30

start on zoom, move to slack

Lab Section C

Soni

Wednesday 1:15 - 2:45

start on zoom (concurrent with Lab A), move to slack

Course Description and Goals

Welcome to CS44! Databases sit at the core of all modern commercial software/systems, managing the storage, update, and retrieval of large amounts of data in an efficient manner. This course provides an introduction to database management systems (DBMS); in particular, concentrating on the theory, design, and implementation of relational database management systems. Topics covered include data models (ER and relational model); data storage and access methods (files, indices); query languages including SQL and relational algebra; query evaluation; query optimization; transaction management; concurrency control; crash recovery; and advanced topics (parallel and distributed DBMS, security, others) Lab projects that involve implementing and testing components of a relational database management system are a large component of the course.

To enroll in this course you must have completed CPSC 35 AND CPSC 31. This course is designated as a natural sciences and engineering practicum (NSEP) and qualifies as a Group 2: Systems course for the CS major/minor requirements.

Course Learning Goals

  • understand the components of a database management system, and design choices for managing system resources to support efficient and correct DB storage, DB accesses, and data constraints

  • understand the importance of abstraction in database systems

  • learn how to represent data conceptually using entity-relationship models

  • learn how relational databases maintain data integrity

  • understand the importance of considering system, resources when designing and choosing data structures

  • learn how to utilize SQL and modern databases to represent large, real-world datasets

  • learn solutions for efficiency and scalability in database systems (query optimization, parallel and distributed databases)

Textbook

Class Schedule

This is a very tentative schedule. It will be updated as we go. We recommend that you review Tips for reading CS texbooks to help you determine what to focus on and how to get the most out of required readings.

WEEK DAY ANNOUNCEMENTS TOPIC ASSIGNMENT
1

Sep 07

 
Intro to Database Management Systems
Data Storage

Weekly Reading:

Lab 0: remote warm-up

Wed Lab: C++ Tools

Lab 1: C++ warm-up

2

Sep 14

Drop/add ends

Buffer Manager

Weekly Reading:

  • 9.4

Wed Lab: C++ OO,Exceptions

Lab 1 cont.: C++ warm-up

Homework 1 (due 9/23): Disk & Buffers

3

Sep 21

 
ER Model
Relational Model

Weekly Reading:

Wed Lab: SwatDB

Lab 2: Buffer Manager

Homework 2 (due 9/28): ER and RAID

4

Sep 28

Quiz 1 (Sep 30)

Relational Model
File Organization

Weekly Reading:

  • T: 3.4-3.5.4, skim 3.3, 3.6-3.8
  • R: 8.2 (intro only), 9.5 - 9.8

Wed Lab: SQLite,Quiz,SwatDB

Lab 2 cont.: Buffer Manager

Homework 3 (due 10/07): Relations

5

Oct 05

 
Files and Indicies
B+ Tree Index

Weekly Reading:

  • T: 8.4-8.4.3
  • T: 8.2.1-8.2.2
  • R: 10 - 10.4

Wed Lab: SwatDB Lab2

Lab 2 cont.: Buffer Manager

Homework 4 (due 10/14): File Organization

6

Oct 12

 
B+ Tree Index
Hash Indices

Weekly Reading:

  • Watch Tuesday's pre-lecture video
  • 10.5-10.6, 10.8.2
  • skim 8.4

Wed Lab: SwatDB File Layer

Lab 3: Heap Page

Homework 5 (due 10/19): B+Tree

7

Oct 19

Quiz 2 (Oct 22)

Hash Indices
Comparing File and Index Organizations
Relational Algebra

Weekly Reading:

  • 11 - 11.2
  • skim 8.4
  • 4 - 4.2

Wed Lab: HeapPage Unit Tests

Lab 3 cont.: Heap Page

8

Oct 26

 
SQL

Weekly Reading:

  • 5 - 5.3
  • 5.4 - 5.5

Wed Lab: HeapPage gcov

Lab 3 cont.: Heap Page

Homework 6 (due 11/02): Hash Index, Relational Algebra

9

Nov 02

CR/NC and Withdraw deadline (Nov 06)

SQL
External Sorting

Weekly Reading:

  • 13

Wed Lab: HeapFile intro

Lab 4: Heap File

Homework 7 (due 11/10): SQL practice

10

Nov 09

Quiz 3 (Nov 12)

Query Evaluation
Query Optimization

Weekly Reading:

  • 12-12.3
  • 12.4-12.6
  • 14-14.3

Wed Lab: heapfile testing

Lab 4 cont.: Heap File

11

Nov 16

 
Query Optimization
Parallelization
Transactions

Weekly Reading:

  • 14.4, 14.7
  • 22.4.3
  • 16-16.2

Wed Lab: Intro to MovieDB lab


Lab 5: Movie Database

 

Nov 23

Thanksgiving

12

Nov 30

 
Transactions
Distributed Databases

Weekly Reading:

  • 16-16.5
  • skim: 22.6-22.8, 22.12, 22.14.1

Wed Lab: More MovieDB tips

Lab 5 cont.: Movie Database

Homework 8 (never due): Quiz4 practice

 

Dec 10

Quiz 4, in two parts (starts 9am Dec. 10, ends 9am Dec. 11)

About Course Work

Grading

Grades will be weighted as follows:

  • Participation: 10%

  • Labs: 45%

  • Quizes/Exams: 45%

Responsibilities & Tips for Success

The Course Learning Goals outlined the skills and objectives this course promises to provide you. For this promises to be upheld, you will need to commit towards the policies outlined below. To succeed you should:

  • Attend class and lab. The primary introduction to course material is through class lecture. Additionally, we often do learning exercises during class, which give you immediate experience with the material we are covering. Class and lab attendance is mandatory. While we are more than happy to help with any material in office hours, priority will be given to students who attend and participate in lecture. Office hours are not to make up for missed lecture.

  • Participate actively in learning process. Showing up is necessary, but not sufficient to success in the course. To fully develop your analytical skills, you are expected to participate in class discussion. This includes asking questions during lecture portions and engaging your peers during short class exercises. Studies show active involvement is the number one determinant of student success.

  • Prepare for lecture You are expected to have done pre-reading before each lecture, as well as reviewing your lecture notes from prior meetings. If you do so, you will be prepared to answer questions and participate in group discussions. See my Tips for reading CS textbooks for guidelines on getting the most of out assigned readings.

  • Start lab assignments early if you get in the habit of doing this, you will be much better off. As the labs get longer and more difficult, starting early will give you plenty of time to mull over the lab problems even when you aren’t actively writing your solution.

  • Practice, practice, practice. The only effective way to learn the material and pass the exams is to consistently do the labs, and to practice example problems presented in class and in the book. Forming study groups to go over practice problems and to review lecture and reading notes is a great way to prepare for exams.

  • Seek help early and often. Because course material builds on previous material, it is essential to your success in this class that you keep up with the course material. There are a lot of sources of help: ask questions during lecture; ask your classmates (make sure you have read the Academic Integrity section for restrictions); get help during lab sessions; and come to office hours.

  • Take hand written lecture notes. In lecture the professor often draws diagrams on the board, some of which you will need to reproduce. Taking notes with paper and pen (vs. on the computer) will allow you to copy these diagrams.

Labs and Homework

All lab work will be done with a partner We will assign partners for each lab. You will submit your lab solutions electronically with git: you must do a git add, commit, and push before the due date to submit your solution on time. More details will be included in lab assignments. Written Homeworks may be done alone or in small groups of 2-4 students. More details will be included in homework assignments.

Labs

Course lab work should be done on the CS lab machines by remotely logging in. You will find more information in the first few lab meetings and assignments. Information on ssh and available lab machines can be found on the CS Department Help Pages.

CS lab machines are for CS course work only. There are other computer lab/locations on campus that are for general-purpose computer use. Please review the CS Lab Rules about appropriate use of CS labs.

Working With Partners

For partnered lab assignments, you should follow these guidelines:

  • The expectation is that you and your partner are working together side by side in the lab for most, if not all, of the time you work on partnered lab assignments.

  • You and your partner should work on all aspects of the project together: initial top-down design, incremental testing and debugging, and final testing and code review.

  • If you are pair programming, where one of you types and one of you watches and assists, then you should swap roles periodically, taking turns doing each part.

  • There may be short periods of time where you each go off and implement some small part independently. However, you should frequently come back together, talk through your changes, push and pull each other’s code from the git repository, and test your merged code together.

  • You should not delete or significantly alter code written by your partner when he or she is not present. If there is a problem in the code, then meet together to resolve it.

  • If there is any issue with the partnership, contact the professor.

Taking time to design a plan for your solution together and to doing incremental implementation and testing together may seem like it is a waste of time, but in the long run it will save you a lot of time by making it less likely that you have design or logic errors in your solution, and by having a partner to help track down bugs and to help come up with solutions to problems.

Partnerships where partners work mostly independently rarely work out well and rarely result in complete, correct and robust solutions. Partnerships where partners work side-by-side for all or most of the time tend to work out very well.

You and your partner are both equally responsible for initiating scheduling times when you can meet to work together, and for making time available in your schedule for working together.

Policies

Absence / Late Work

Each student may use up to 2 late days per lab assignment, up to a total sum of 5 days for the semester, no questions asked. This is more than a normal semester due to added difficulties of working remotely this semester. Late days do not apply to homework, quizzes, or other forms of assessment. A late day is a considered a full 24-hours (i.e., 15 minutes late is the same as 23 hours late) and late days are counted against all lab partners.

To use your late days, you must email your professor after you have completed the lab and pushed to your repository. You do not need to inform anyone ahead of time, and you do not need to provide a reason. When you use late days, you should still expect to work on the newly-released lab during the following lab section meeting. The professor will always prioritize answering questions related to the current lab assignment during lab meetings and office hours. In the rare case in which only one partner has unused late days, the partnership can use the late days, barring a consistent pattern of abuse.

Late days cannot be used on homeworks because they are designed as preparation for quizzes; they are generally due 2 days before a quiz and solutions will be released immediately. Instead, we will automatically drop the lowest homework grade. Students are encouraged to submit even partial solutions to ensure they receive partial credit/feedback.

If you feel that you need an extension on an assignment or that you are unable to attend class for two or more meetings due to a medical condition (e.g., extended illness, concussion, hospitalization) or other emergency, you must contact the dean’s office and your instructors. Faculty will coordinate with the deans to determine and provide the appropriate accommodations. Note that for illnesses, the College’s medical excuse policy, states that you must be seen and diagnosed by the Worth Health Center if you would like them to contact your class dean with corroborating medical information.

Academic Accomodations

FALL 2020 ACCOMMODATIONS STATEMENT

If you believe you need accommodations for a disability or a chronic medical condition, please contact Student Disability Services via email at studentdisabilityservices@swarthmore.edu to arrange an appointment to discuss your needs. As appropriate, the office will issue students with documented disabilities or medical conditions a formal Accommodations Letter. Since accommodations require early planning and are not retroactive, please contact Student Disability Services as soon as possible. For details about the accommodations process, visit the Student Disability Service Website

You are also welcome to contact me privately to discuss your academic needs. However, all disability-related accommodations must be arranged, in advance, through Student Disability Services.

To receive an accommodation for a course activity you must have an official Accommodations Letter and you need to meet with me to work out the details of your accommodation at least two weeks prior to any activity requiring accommodations.

Academic Integrity

Academic honesty is required in all your work. Under no circumstances may you hand in work done with (or by) someone else under your own name. Your code should never be shared with anyone; you may not examine or use code belonging to someone else, nor may you let anyone else look at or make a copy of your code. This includes, but is not limited to, obtaining solutions from students who previously took the course or code that can be found online. You may not share solutions after the due date of the assignment or make them publicly available anywhere (e.g. public GitHub repository).

Discussing ideas and approaches to problems with others on a general level is fine (in fact, we encourage you to discuss general strategies with each other), but you should never read anyone else’s code or let anyone else read your code. All code you submit must be your own with the following permissible exceptions: code distributed in class, code found in the course text book, and code worked on with an assigned partner. In these cases, you should always include detailed comments that indicates on which parts of the assignment you received help, and what your sources were.

Failure to abide by these rules constitutes academic dishonesty and will lead to a hearing of the College Judiciary Committee. According to the Faculty Handbook:

"Because plagiarism is considered to be so serious a transgression, it is the opinion of the faculty that for the first offense, failure in the course and, as appropriate, suspension for a semester or deprivation of the degree in that year is suitable; for a second offense, the penalty should normally be expulsion."

The spirit of this policy applies to all course work, including code, homework solutions (e.g., proofs, analysis, written reports), and exams. Please contact the instructors if you have any questions about what is permissible in this course.

Handy Resources

Class Resources

Unix and C++ Programming Resources

SQL

Book Websites