Announcements

Welcome to CS44!

  • Lab 0 has been posted. It is practice with some course tools and resources and to prepare you for Wednesday’s lab session. Please complete this before your Wednesday lab session.

  • Purchace Required Textbook/Materials. Please bring bring your clicker to class on Thursday.

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 EdStem. All assignments are posted to the class Class Schedule ( jump to the current week on the schedule).

Class Info

Professor: Tia Newhall, and Lab Lecturer: Charlie Kazer

Lecture

TR 1:15-2:35pm

Sci Cntr 204 (between Martin and Cornell Library)

Lab A

Wed 1:05 - 2:35

Clothier 16

Lab B

Wed 2:45 - 4:15

Clothier 16

  • Office hours

    Mondays

    1:30 - 3:30

    Charlie

    Sci Cntr 262A

    Tuesdays

    3:30-5:00

    Tia

    Sci Cntr 149

    Fridays

    2:15-3:30

    Tia

    Sci Cntr 149

    and by appointment

  • EdStem: Q&A Forum

  • GitHub: CS44 Swarthmore GitHub Org

  • Gradescope: {gradescopeurl}[Gradescope]

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)

Required Textbook/Materials

  1. Textbook: Database Management Systems (Third Edition), by Raghu Ramakrishnan and Johannes Gehrke.

    There will also be a few readings from: Dive into Systems (the CS31 textbook, which is free online).

  2. Clicker device: you can purchase a clicker (iClicker devices) It is one of the required materials for the course of which you can use your TAP fund to purchase.

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

Jan 21

 

Intro to Database Management Systems
Data Storage

Weekly Reading:

Lab 0: course tools


Wed Lab: TBA


Lab 1: TBA

2

Jan 28

 
Buffer Manager

Weekly Reading:

  • 9.4

Wed W2 Lab: TBA
Lab 2: TBA
Homework : TBA

3

Feb 04

Drop/add ends (Feb 07)

ER Model
Relational Model

Weekly Reading:

Wed Lab: TBA
Lab 2 cont: TBA
Homework : TBA

4

Feb 11

 
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: TBA
Lab 3: TBA
Homework : TBA

5

Feb 18

 
Files and Indicies
B+ Tree Index

Weekly Reading:

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

Wed Lab: TBA
Lab 4: TBA
Homework : TBA

6

Feb 25

 
TBD

Wed Lab: TBA
Lab 4 cont: TBA
Homework : TBA

7

Mar 04

 
B+ Tree Index
Hash Indices

Weekly Reading:

  • T: 10.5-10.6, 10.8.2
  • R: 11 - 11.2
  • R: skim 8.4

Wed Lab: TBA
Lab 5: TBA
Homework : TBA

 

Mar 11

Spring Break

8

Mar 18

 
Hash Indices
Comparing File and Index Organizations
Relational Algebra

Weekly Reading:

  • T: 11-11.2, skim 8.4
  • R: 4 - 4.2

Wed Lab: TBA
Lab 5 cont: TBA
Homework : TBA

9

Mar 24

Midterm (7-9pm, Sci Cntr. 101)

Mar 25

CR/NC and Withdraw deadline (Mar 28)

SQL

Weekly Reading:

T: 5 - 5.3
R: 5.4 - 5.5

Wed W9 Lab: TBA
Lab Assn: TBA
Homework: TBA

10

Apr 01

 
SQL
External Sorting
Query Evaluation

Weekly Reading:

T 5.5
R 13
R 12-12.2

Wed W10 Lab: TBA
Lab Assn: TBA
Homework: TBA

11

Apr 08

 
Query Evaluation
Query Optimization

Weekly Reading:

T: 12-12.3
R: 12.4-12.6
R: 14-14.3

Wed Lab: TBA
Lab Assn: TBA
Homework : TBA

12

Apr 15

 
Query Optimization
Parallelization
Transactions

Weekly Reading:

T: 14.4, 14.7
T: 22.4.3
R: 22.4.3
R: 16-16.2

Wed Lab: TBA

13

Apr 22

 
Transactions
Crash Recovery

T: 16-16.5
R: skim 18

Wed Lab: TBA
Lab Assn: TBA

14

Apr 29

 
Distributed Databases
Non SQL Databases

Weekly Reading:

  • skim: 22.6-22.8, 22.12, 22.14.1

Wed Lab: TBA
Lab Assn: TBA
Homework : TBA

15

May 06

 

 

 

About Course Work

Grading

Grades will be weighted as follows:

  • Labs and Homeworks: 45%

  • Midterm Exam: 20% (Monday, March 24, 7-9pm)

  • Final Exam: 25%

  • Participation and Reading Quizes: 10%

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. Never do git add *. Instead, always add individual files by their name or by matching prefix (git add *.cpp or git add file1.cpp file2.cpp)

Written Homeworks will be done with your Homework and Study Group (3-4 students). More details will be included in homework assignments.

Labs

Course lab work should be done on the CS lab machines. I encourage you to work in one of the CS labs when possible (vs. remotely logging in), particularly when working with a partner. The CS labs (rooms 240, 256, 238 and Clother basement) are open 24 hours a day, 7 days a week for you to use for CS course work. With the exception of times when a class, or lab, or ninja session is scheduled in one of these rooms, you may work anytime in a CS lab on CS course work. The overflow lab (238) is always available.

You also can remotely log into the CS lab machines using ssh. We recommend using a Unix editor like vim (or emacs) when remotely connecting via ssh. More information is availalabe with the Lab 0 assignment, and from the CS Department Help Pages.

CS lab machines (and printers and other resources) 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.

Accessing the CS labs after hours

You can use your OneCard to gain access to the computer labs at nights and on the weekends. Just wave your ID over the onecard reader next to the lab doors. When the green light goes on, just push on the door handle to get in (the door knob will not turn). If you have issues with the door locks, send an email to local-staff@cs.swarthmore.edu. If the building is locked, you can use your OneCard to enter the door between Martin and Cornell library. Your OneCard will give you access to the labs in rooms SCI 238, 240, 256, and the Clothier basement.

For your and other student’s saftey, please leave the lab doors closed nights and weekends (with the exception of during ninja sessions). Also, please turn off lights and close the door if you are the last one to leave a lab space.

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 4 days total for the semester, no questions asked. Late days do not apply to homework, quizzes, exams, 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 Charlie (ckazer1) 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. You are encouraged to submit even partial solutions to ensure you receive partial credit/feedback on assignments.

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. Discussing ideas and approaches to problems with others on a general level is encouraged, but you should never share your solutions with anyone else nor allow others to share solutions with you. You may not examine solutions belonging to someone else, nor may you let anyone else look at or make a copy of your solutions. This includes, but is not limited to, obtaining solutions from students who previously took the course or solutions that can be found online. You may not share information about your solution in such a manner that a student could reconstruct your solution in a meaningful way (such as by dictation, providing a detailed outline, or discussing specific aspects of the solution). You may not share your solutions even after the due date of the assignment.

In your solutions, you are permitted to include material which was distributed in class, material which is found in the course textbook, and material developed by or with an assigned partner. In these cases, you should always include detailed comments indicating on which parts of the assignment you received help and what your sources were.

Use of or consultation with generative AI (e.g., chatGPT or GitHub CoPilot) is considered to be unauthorized collaboration with another source and is a violation of our academic integrity policy.

When working on tests, exams, or similar assessments, you are not permitted to communicate with anyone about the exam during the entire examination period (even if you have already submitted your work). You are not permitted to use any resources to complete the exam other than those explicitly permitted by course policy. (For instance, you may not look at the course website during the exam unless explicitly permitted by the instructor when the exam is distributed.)

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."

This policy applies to all course work, including but not limited to code, written solutions (e.g. proofs, analyses, reports, etc.), exams, homework, and so on. This is not meant to be an enumeration of all possible violations; students are responsible for seeking clarification if there is any doubt about the level of permissible communication.

The general ethos of this policy is that actions which shortcut the learning process are forbidden while actions which promote learning are encouraged. Studying lecture materials together, for example, provides an additional avenue for learning and is encouraged. Using a classmate’s solution, however, is prohibited because it avoids the learning process entirely.

If you have any questions about what is or is not permissible, please contact your instructor.

Exam Integrity

Students must strictly adhere to the following policy, which applies to all exams taken in a Computer Science course at Swarthmore:

Exam takers must place all non-essential items at the front of the room (or other designated area). Unless otherwise permitted, students may not have any electronic devices or course materials in their possession during the entirety of the exam. This includes cell phones, tablets, laptops, smart watches, course notes, articles and books, among others. These items should be placed at the front of the room near the proctor. If you need to leave the room during the exam, you must obtain permission from an instructor first. Any non-permitted discussion or aide in regards to exam material will result in immediate forfeiture of the exam and a report to the College Judiciary Committee. Please discuss any concerns or accommodations with your instructor prior to starting the exam.

Handy Resources

Class Resources

Unix and C++ Programming Resources

SQL

Book Websites