CS 348: Introduction to Database Systems  

Spring 2024

Instructor: Sujaya Maiyya

This course is an introduction to database management systems (DBMSs), which are the core software systems that applications use to store, manage, query, and manipulate very large-scale data efficiently. The course covers three core topics. (1) We cover the fundamental topics of database management, which include: the relational data model and its query languages; integrity constraints to enforce invariants about application data; indexes and views to make DBMSs efficient for an application workload; and transactions to ensure safe concurrent access to data, focusing on fundamental topics such as serializability and ACID guarantees of a DBMS. (2) We cover database design methodology, which shows how to design "good" databases instead of "bad" ones and how this can be made formal using the theory of normalization. (3) We cover a suite of topics about the internals and architectures of DBMSs: physical record design, query planning and optimization, indexes, and transaction protocols. While topics under (1) and (2) are topics from the perspective of DBMS users and administrators, and teach students how to use DBMSs efficiently in practice, topics under (3) is from the perspective of system engineers that actually implement the DBMS, and aims to engage students interested in the low-level implementations of the core data structures, algorithms, and protocols DBMSs use to support higher-level applications.

Required: Database System Concepts (DSC) (Seventh Edition) Abraham Silberschatz, Henry F. Forth and S.Sudarshan, McGraw Hill. 
Optional: Database Systems: The Complete Book (DSCB), Hector Garcia-Molina, Jeff Ullman, and Jennifer Widom (Second Edition), Pearson Education 
Optional: Data Intensive Applications (DIA), Martin Kleppman (First Edition), O'Reilly 

LEC 002    1:00-2:20 PM T-Th    MC 2054    Sujaya Maiyya
LEC 003    2:30-3:50 PM T-Th    MC 2054    Sujaya Maiyya
Important Note: LEC 001 and LEC 004 are taught by a different professor (David Toman) and will follow different schedule and use different lecture materials/assignments/exams. It is important that you attend lectures (submit assignments, take exams) for the section you are enrolled in.

Week Lecture Topics & Slides Readings Dates Important Dates
1 Overview of DBMSs, Course Overview, Administrative Information [l1.pdf] DSC Ch 1 Tue, May 7
Introduction to the Relational Model [l2.pdf] DSC Ch 2 Thu, May 9
2 Relational Algebra Part 2 + SQL (1) [l3-1.pdf][l3-2.pdf] DSC Ch 3 Tue, May 14 Assignment 1 Release
SQL (2) [l4.pdf] DSC Ch 3-4 Thu, May 16
3 No lecture (see this) Tue, May 21
SQL (3) [l5.pdf] DSC Ch 4-5 Thu, May 23 Project Milestone 0 Due
4 SQL (4) [l6.pdf] DSC Ch 4, 5 Tue, May 28
SQL (5) [l7.pdf] DSC Ch 4, 5 Thu, May 30
5 DB Design: DB Design E/R Mode [l8.pdf] DSC Ch 6 Tue, June 4 Assignment 1 Due
DB Design: E/R-Relational Translation [l9.pdf] DSC Ch 6 Thu, Jun 6 Assignment 2 Release
6 DB Design: Theory (1) [l10.pdf] [l9-exercise.pdf] DSC Ch 7 Tue, June 11 (Guest/Online)
DB Design: Theory (2) [l11.pdf] DSC Ch 7 Thu, June 13 (Guest/Online)
7 Review lecture [review.pdf] Tue, Jun 18
DBMS Architecture Overview & Physical Data Organization [l11.pdf] DSC Ch 12, 13 Thu, Jun 20 Project Milestone 1 Due
8 Indexing [l12.pdf] DSC Ch 14 Tue, June 25
Query Processing [l13.pdf] [l13-optional.pdf] DSC Ch 15 Thu, Jun 27 Assignment 2 Due
9 Query Optimization [l14.pdf] DSC Ch 16 Tue, Jul 2 Assignment 3 Release
Review lectures 11-14 [review-2.pdf] Thu, Jul 4
Midterm Fri, Jul 5
10 Transactions [l15.pdf] DSC Ch 17 (Optional: DIA Ch 7) Tue, Jul 9 Project Milestone 2 Due
Transactions (cont) [l16.pdf] Thu, Jul 11
11 Database Recovery [l17.pdf] DSC Ch 18, 19 Tue, Jul 16
Beyond 348 [l18.pdf] Class notes Thu, Jul 18
Fri, Jul 19 Assignment 3 Due
12 Project demos Tue, Jul 23
Project demos Thu, Jul 25 Project Report Due
13 Finals review [review-3.pdf] Tue, Jul 30

Note that the schedule is tentative and subject to change. We may consider online mode for the class for special situations.

Crowdmark will be used to submit non-coding assignments. When the CrowdMark instance is ready, all students enrolled in the class will receive an email with a link to their individual submission site. In order to submit, upload a separate PDF file (multiple pages are allowed) to each question. You may resubmit as often as necessary until the due date. (More detailed CrowdMark information is available at https://crowdmark.com/help/completing-and-submitting-an-assignment/.)

Marmoset will be used for the programming questions. More details will be provided in individual assignments.

Assignment release dates and due dates are as follows (dates are tentative and may change):

Assignment Date Posted Due (11:59pm EDT/EST) Hand In Via Markers
1 (lectures 1-5) Tue, May 14 Tue, Jun 4 Crowdmark   Marmoset TBD
2 (lectures 6-10) Thu, Jun 6 Thu, Jun 27 Crowdmark   TBD
3 (lectures 11-16) Tue, Jul 2 Fri, Jul 19 Crowdmark TBD

Instructions for Assignments: Your written solutions will be judged not only for correctness but also for the quality of your presentation and explanations.

Collaboration Policy: The work you hand in must be your own. Unless specified otherwise, you can always use any result from the textbook, notes, or previous assignment just by citing it. You may discuss the assignment questions verbally with others, but you should come away from these discussions with no written or electronic records and you must acknowledge the discussion. Acknowledge any sources you have used. Any assistance received (from human or nonhuman sources) that is not given proper citation may be considered a violation of the university policies.

Late Policy:

The group project is optional. You can choose between doing the group project or having higher weighted exams (refer to the Mark Breakdown section below).

Learn will be used to submit the group project. Detailed instructions will be given in week 2.

Milestone Due (11:59pm EDT/EST)
0 (Team up) Thu, May 23
1 (Proposal) Thu, Jun 20
2 (Midterm Report) Tue, Jul 9
3 (Final Report & Demo) Thu, Jul 25

We will use Piazza for all course announcements and as a forum for students to ask and answer questions. Note that Piazza is for student-student interactions. So you should enroll yourself at your earliest convenience. During Piazza discussions, please do not reveal the solutions to the assignments by requesting or offering detailed advice. We'll delete comments that reveal too much. Violations can result in academic sanctions.

Similarly, do not solicit hints or provide hints about how to solve the homework problems on other bulletin boards, such as Facebook. Violations can result in academic sanctions.

Piazza is not the place to dispute how assignments are marked. If you have a complaint, please follow the process given below.

Instructor Email (@uwaterloo.ca) Office Hours
Sujaya Maiyya  (smaiyya) Tuesdays, 4:30-5:30 PM (DC 3343)

Instructional Apprentices and Teaching Assistants Email (@uwaterloo.ca)
Shubhankar Mohapatra (IA) (shubhankar.mohapatra)
Haseeb Ahmed (h25ahmed)
Alexander William Caton (awcaton)
Chanaka Lakmal Lokupothagamage Don (cllokupo)
Zhengyuan Dong (z6dong)
Harrum Noor (h8noor)
Instructional Support Coordinator Email (@uwaterloo.ca)
Sylvie Davies (sldavies)

Mark breakdown

Two marking schemes, depending on whether you choose to do the group project:

Although there is no minimum passing percent for either of the exams, all students must take both the mid-term and the final exams to pass the course.

Points of contact for common questions

Note: If you decide to e-mail the course staff, you must use your uwaterloo Quest e-mail account (WatIAM/Quest userID @uwaterloo.ca); otherwise we cannot verify who you are and are limited on what we can accept and respond to.

Help Topic Contact
Assignment: Missed Deadline We do not accept emailed assignments. The last files submitted before the deadline will be marked (submit early and often, even if not finished).
If the deadline is missed due to illness or other valid, verifiable reason, see Missed Work Due To Illness below.
Assignment: Marking Error Re-mark request, due within one week of release of marks on CrowdMark/Markoset. Contact the TA who marked the specific question and submit a written request. See TAs for contact information.
Assignment: Recording Error Grades will be made available through Crowdmark and Marmoset. Official marks will finally be on Learn. If you notice an error in the recorded value, please contact Sylvie Davies (CS 348 ISC).
Enrollment If Quest won't let you enroll or switch LEC or TUT sections without a permission/override number: Instructors and course staff are unable to help you—you must see a CS academic advisor.
General Course Help Check office hours.
Missed Work due to Illness or Valid & Verifiable Reason (Assignments, Exams) Validation required. See Verification of Illness Services but substitute Sylvie Davies (CS 348 ISC) for references to instructor. Make sure you also read the Math Faculty document on the consequences of submitting a VIF.
Accessibility Services (AAS) exam accommodation forms (request to write at AAS) Submit to AAS at least 3 weeks before exam


Plagiarism is a very serious academic offence and is penalized accordingly. When you plagiarize you damage the learning experience for yourself and others. To avoid plagiarism accusations, do not copy other people's work, and cite all references that you use. If you work with others, only discuss general aspects of the course material, not specific solutions. Write up the solutions yourself, not in groups.

Mental Health Resources

Mental Health: If you or anyone you know experiences any academic stress, difficult life events, or feelings like anxiety or depression, we strongly encourage you to seek support.

On-campus Resources

Off-campus Resources

Diversity: It is our intent that students from all diverse backgrounds and perspectives be well served by this course, and that students’ learning needs be addressed both in and out of class. We recognize the immense value of the diversity in identities, perspectives, and contributions that students bring, and the benefit it has on our educational environment. Your suggestions are encouraged and appreciated. Please let us know ways to improve the effectiveness of the course for you personally or for other students or student groups. In particular:

University Policies (University required text)

Academic Integrity:
In order to maintain a culture of academic integrity, members of the University of Waterloo community are expected to promote honesty, trust, fairness, respect and responsibility. All members of the UW community are expected to hold to the highest standard of academic integrity in their studies, teaching, and research. The Office of Academic Integrity's website ( http://www.uwaterloo.ca/academicintegrity) contains detailed information on UW policy for students and faculty. This site explains why academic integrity is important and how students can avoid academic misconduct. It also identifies resources available on campus for students and faculty to help achieve academic integrity in - and out - of the classroom.

A student who believes that a decision affecting some aspect of his/her university life has been unfair or unreasonable may have grounds for initiating a grievance. Read Policy 70 - Student Petitions and Grievances, Section 4, http://www.adm.uwaterloo.ca/infosec/Policies/policy70.htm .

A student is expected to know what constitutes academic integrity, to avoid committing academic offenses, and to take responsibility for his/her actions. A student who is unsure whether an action constitutes an offense, or who needs help in learning how to avoid offenses (e.g., plagiarism, cheating) or about "rules" for group work/collaboration should seek guidance from the course professor, academic advisor, or the Undergraduate Associate Dean. When misconduct has been found to have occurred, disciplinary penalties will be imposed under Policy 71 - Student Discipline. For information on categories of offenses and types of penalties, students should refer to Policy 71 - Student Discipline, http://www.adm.uwaterloo.ca/infosec/Policies/policy71.htm.

Avoiding Academic Offenses:
Most students are unaware of the line between acceptable and unacceptable academic behaviour, especially when discussing assignments with classmates and using the work of other students. For information on commonly misunderstood academic offenses and how to avoid them, students should refer to the Faculty of Mathematics Cheating and Student Academic Discipline Policy, https://uwaterloo.ca/math/current-undergraduates/regulations-and-procedures/cheating-and-student-academic-discipline-guidelines.

MOSS (Measure of Software Similarities) is used in this course as a means of comparing students' assignments to ensure academic integrity. We will report suspicious activity, and penalties for plagiarism/cheating are severe. Please read the available information about academic integrity very carefully.

Discipline cases involving any automated marking system such as Marmoset include, but are not limited to, printing or returning values in order to match expected test results rather than making an actual reasonable attempt to solve the problem as required in the assignment question specification.

A student may appeal the finding and/or penalty in a decision made under Policy 70 - Student Petitions and Grievances (other than regarding a petition) or Policy 71 - Student Discipline if a ground for an appeal can be established. Read Policy 72 - Student Appeals, https://uwaterloo.ca/secretariat/policies-procedures-guidelines/policy-72 .