Syllabus

Table of Contents

Instructor

Carter Zenke
carter@cs50.harvard.edu

Head Teaching Fellow

Doug Lloyd
lloyd@cs50.harvard.edu

Description

This course is an introduction to databases using a language called SQL. Students learn how to create, read, update, and delete data with relational databases, which store data in rows and columns, and how to model real-world entities and relationships among them using tables with appropriate types, triggers, and constraints. The course covers how to normalize data to eliminate redundancies and reduce potential for errors and how to join tables together using primary and foreign keys. Students learn how to automate searches with views and expedite searches with indexes, as well as how to connect SQL with other languages like Python and Java. The course begins with SQLite for portability’s sake and ends with introductions to PostgreSQL and MySQL for scalability’s sake. Assignments are inspired by real-world datasets.

Prerequisites

None.

Learning Objectives

Among the course’s overarching goals are…

  • to equip you with the tools to use and design modern databases, via which you can efficiently store information, and
  • to support you in using SQL to build something of meaning to you.

Ultimately, the course provides you with a foundation in databases that can support your further study, work, or play in computer science. The same foundation can also empower you to apply your knowledge to problems in other domains, far beyond computer science alone.

Expectations

You are expected to…

Just as importantly: take charge of your learning. Think, feel, act, and join in. Be present in the moment. Say something. Know the names of your classmates. Be punctual, responsible, and with-it. Take a risk. Connect your daily experience to what you are learning. Wonder and share your wonderings. Be intellectually playful. Have fun. Ask questions and answer questions. This may be a class about computers, but you should engage as a human.

As for the course’s staff, you can expect that we will work to create meaningful learning experiences for you and with you. We’ll want to know what you care about, and we’ll have high expectations for your learning in the course. You can expect we will be available (excited, even!) to meet you via office hours. And you can expect that we will give you honest feedback on your progress.

Grading

Final grades are determined using the following weights:

Problem sets 50%
Assessment opportunity 15%
Final project 15%
Checks for understanding 10%
Section attendance 10%

Scores are normalized across teaching fellows at term’s end, so mid-semester comparisons of scores among students are not reliable indicators of standing. It is also for this reason that the course does not offer grade projections.

Problems will be graded on the basis of correctness, design, and style, with each problem’s overall score computed as the sum of 3 correctness points, 3 design points, and 2 style points.

  • Correctness refers to the extent to which your code is consistent with the problem’s specification and free of bugs.
  • Design refers to the extent to which your code is written well (i.e., efficiently, elegantly, and logically).
  • Style refers to the extent to which your code is readable (i.e., clear, consistent, commented, indented, with variables aptly named).

Your own effort and thoughtfulness, over the long term, will result in more meaningful personal growth than achieving high scores alone. Thus, genuine effort and authentic engagement are considered, as is input from the teaching fellows. The course does not have pre-determined cutoffs for final grades. Each student’s final grade is individually determined at term’s end.

Beyond what is stated here, the course does not provide further detail about grade conversions. The course does not offer mid-semester grade projections (except in cases where a student is clearly in jeopardy of an unsatisfactory grade), as each element’s weight, above, can materially alter that projection.

Experience

Lectures

Lectures are pre-recorded videos in which new concepts and skills are introduced by example. Every two weeks, you’ll begin learning new concepts and skills by engaging with the corresponding lecture.

Lectures are watched on-demand.

  Date Lecture Topics
Lecture 0 2024-01-22T12:00:00-05:00 Querying databases, database engines, selecting, filtering, aggregating, ordering
Lecture 1 2024-02-05T12:00:00-05:00 Relating keys, tables, nested queries, joins
Lecture 2 2024-02-19T12:00:00-05:00 Designing schemas, types, table creation, normalization
Lecture 3 2024-03-04T12:00:00-05:00 Writing inserting, updating, cleaning, deleting, triggers
Lecture 4 2024-03-18T12:00:00-04:00 Viewing views for simplifying, aggregating, partitioning, and securing; common table expressions
Lecture 5 2024-04-01T12:00:00-04:00 Optimizing indexes, b-trees, locks, transactions, vacuuming
Lecture 6 2024-04-15T12:00:00-04:00 Scaling database servers (MySQL, PostgreSQL), replicating, sharding, access controls

Sections

Lectures are followed by 60- to 90-minute sections led by the course’s teaching fellows. A section is a smaller, highly interactive class. Section will require you to discuss the course’s material, to ask questions, to explore related concepts, and to get to know your classmates.

Students are required to attend, live and with webcam and audio enabled, one section per lecture unless granted an exception in writing by the course’s head teaching fellow within 48 hours after you have been emailed your section assignment. If circumstances change mid-semester, and you find yourself no longer able to attend sections when you previously were able to, contact the head teaching fellow.

Office Hours

Office hours are optional opportunities for guidance and feedback from the staff on problem sets. Office hours are also for discussion of the course’s material more generally. Staff want to meet you. Come to office hours, even if you aren’t sure what your questions are. A schedule will be posted on the course’s website.

Problem Sets

A problem set is a collection of problems, usually 2 to 4 of them. Each problem asks you to apply what you have learned from lecture and section to a new situation inspired by the real world.

Problem Set Release Deadline
Problem Set 0 2024-01-22T12:00:00-05:00 2024-02-04T23:59:00-05:00
Problem Set 1 2024-02-05T12:00:00-05:00 2024-02-18T23:59:00-05:00
Problem Set 2 2024-02-19T12:00:00-05:00 2024-03-03T23:59:00-05:00
Problem Set 3 2024-03-04T12:00:00-05:00 2024-03-17T23:59:00-04:00
Problem Set 4 2024-03-18T12:00:00-04:00 2024-03-31T23:59:00-04:00
Problem Set 5 2024-04-01T12:00:00-04:00 2024-04-14T23:59:00-04:00
Problem Set 6 2024-04-15T12:00:00-04:00 2024-04-28T23:59:00-04:00

Checks for Understanding

Checks for understanding (“checks”) are short assignments due after each lecture that ask you to practice applying each lecture’s concepts. Among the goals of the checks for understanding are that you synthesize knowledge from class alone. You may use any materials on CSCI E-151’s course website (i.e., cs50.harvard.edu), but nothing else (i.e., you may not use tools like cs50.ai or cs50.dev, nor search for information on the internet at large). The only humans to whom you may turn for help or from whom you may receive help are the course’s heads. Ask for help by submitting a private post in the Checks category on Ed.

Check Release Deadline
Check 0 2024-01-22T12:00:00-05:00 2024-01-28T23:59:00-05:00
Check 1 2024-02-05T12:00:00-05:00 2024-02-11T23:59:00-05:00
Check 2 2024-02-19T12:00:00-05:00 2024-02-25T23:59:00-05:00
Check 3 2024-03-04T12:00:00-05:00 2024-03-10T23:59:00-04:00
Check 4 2024-03-18T12:00:00-04:00 2024-03-24T23:59:00-04:00
Check 5 2024-04-01T12:00:00-04:00 2024-04-07T23:59:00-04:00
Check 6 2024-04-15T12:00:00-04:00 2024-04-21T23:59:00-04:00

Many questions on the checks for understanding are out of 3 points. When you receive your feedback on these assignments, these scores translate as follows:

  • 3 is awarded for thoughtful answers that demonstrate a full understanding of the material in a manner consistent with the course’s expectations. Please note that this does not necessarily mean a long answer; indeed, an overly long answer that introduces irrelevant information is not likely to receive a 3. Rather, a 3 is awarded to a thorough and well thought-out and prepared answer that focuses on the subject of the question being presented.
  • 2 is awarded for a good answer that demonstrates a partial understanding of the material, containing 1 or more substantial opportunities for further improvement.
  • 1 is awarded for an answer that indicates a still-developing understanding of the concepts at-hand.
  • 0 is given to answers that are incorrect, exceedingly brief, or blank.

Assessment Opportunity

The assessment opportunity is a summative assessment which you are expected to take toward the end of the term, anytime in a specified window. “Summative” means that the assessment may include any and all prior topics. “Summative” also means that the assessment is designed to help you reflect on your progress at the end of your learning experience, relative to where you began. The primary purpose of the assessment opportunity is to help you assess your own growth.

The assessment opportunity is open-book: you may use any and all non-human resources, except for generative AI. The only humans to whom you may turn for help or from whom you may receive help are the course’s heads.

The assessment opportunity is designed to be challenging, not tricky or surprising. If you focus, reflect, and practice, you will perform well.

released due
2024-05-02T12:00:00-04:00 2024-05-07T23:59:00-04:00

Final Project

The climax of this course is its final project. The final project is your opportunity to take your newfound savvy with SQL for a spin and develop your very own database. So long as your project draws upon this course’s lessons, the nature of your project is entirely up to you, albeit subject to the staff’s approval. You are welcome to utilize any infrastructure, provided the staff ultimately has access to any hardware and software that your project requires. All that we ask is that you build something of interest to you, that you solve a substantive problem, that you positively impact others, or that you change the world. Strive to create something that outlives this course.

Since software development is rarely a one-person effort, you are allowed an opportunity to collaborate with one or two classmates for this final project. Needless to say, it is expected that every student in any such group contribute equally to the design and implementation of the project. Moreover, it is expected that the scope of a two- or three-person group’s project be, respectively, twice or thrice that of a typical one-person project. A one-person project should entail more time and effort than is required by each of the course’s problem sets. Although no more than three students may design and implement a given project, you are welcome to solicit advice from others, so long as you respect the course’s policy on academic honesty.

released due
2024-04-08T12:00:00-04:00 2024-05-11T23:59:00-04:001

1 The final project also has two intermediate milestones. This is the final due date of the final milestone.

Lateness Policy

You have a semester-long allowance of 72 hours (divided into 1-minute segments) to submit or re-submit problem sets late. You cannot use these hours on checks for understanding, the assessment opportunity, or the final project. This allowance should be used carefully (if at all!), but can otherwise be allocated in any manner of your choosing, which means that you may:

  • Use the full 72 hours on one problem set; or
  • Use just over 10 hours on each problem set; or
  • Use 9 hours and 22 minutes on one problem set, 30 hours and 11 minutes on another, 54 minutes on a third, etc.

The amount of this allowance “charged” to a problem set is equal to the lateness of the latest problem inside that problem set turned in. Once the 72-hour allowance has been exhausted, then from that point on the course will begin to impose a 0.1% deduction to your grade for all parts of a problem set for each minute it is turned in late. Therefore, once your allowance is exhausted, for example:

  • Any work turned in 10 minutes late will earn 99% of the points it would have earned had it been turned in on time (a 1.0% deduction).
  • Any work turned in 60 minutes late will earn 94% of the points it would have earned had it been turned in on time (a 6.0% deduction).
  • Any work turned in 1,000 minutes (16 hours, 40 minutes) late is effectively zeroed, as that would be a 100.0% deduction.

Whether you use your semester-long allowance or not, the absolute latest any single problem set may be turned in for credit is 72 hours from its original deadline. Gradescope will not allow any submissions after that point, nor will the course ordinarily accept them via some other means.

Late work will not be accepted for checks for understanding, the assessment opportunity, or the final project.

Questions about this policy should be directed to the head teaching fellow.

Extension Policy

Given the flexibility of the lateness policy, above, the course does not allow for extensions of any kind on its problem sets. Exceptions to this policy will be considered only in situations of documented medical or family emergency. Extensions that are only requested after a problem set’s deadline will not be considered at all. In these situations, communication with the course staff is paramount. The course rarely grants extensions retroactively, and so it is imperative you be in touch about your need for an extension promptly. The only individual authorized to grant extensions is the head teaching fellow; please be sure to include any relevant documentation in your request.

Mental Health

If you experience significant stress or worry, changes in mood, or problems eating or sleeping this semester, whether because of CSCI E-151 or other courses or factors, please do not hesitate to reach out immediately, at any hour, to any of the course’s heads to discuss. Everyone can benefit from support during challenging times. Not only are we happy to listen and make accommodations with deadlines as needed, we are also happy to refer you to additional support structures on campus.

Accessibility

The Accessibility Services Office (ASO) is available to support all students who require accommodations due to disabling conditions; all such accommodations must be approved and coordinated by the ASO. If you require accommodations, please contact the ASO at 617-998-9640, or by email at accessibility@extension.harvard.edu.

Academic Honesty

This course’s philosophy on academic honesty is best stated as “be reasonable.” The course recognizes that interactions with classmates and others can facilitate mastery of the course’s material. However, there remains a line between enlisting the help of another and submitting the work of another. This policy characterizes both sides of that line.

The essence of all work that you submit to this course must be your own. Collaboration on assigned problem sets is not permitted except to the extent that you may ask classmates and others for help so long as that help does not reduce to another doing your work for you. Generally speaking, when asking for help, you may show your code to others, but you may not view theirs, so long as you and they respect this policy’s other constraints. Collaboration on the course’s final project is permitted to the extent prescribed by its specification.

Below are rules of thumb that (inexhaustively) characterize acts that the course considers reasonable and not reasonable. If in doubt as to whether some act is reasonable, do not commit it until you solicit and receive approval in writing from the course’s heads. Acts considered not reasonable by the course are handled harshly. If the course refers some matter for disciplinary action and the outcome is punitive, the course reserves the right to impose local sanctions on top of that outcome that may include an unsatisfactory or failing grade for work submitted or for the course itself. The course ordinarily recommends exclusion (i.e., required withdrawal) from the course itself.

Regret clause. If you commit some act that is not reasonable but bring it to the attention of the course’s heads within 72 hours, the course may impose local sanctions that may include an unsatisfactory or failing grade for work submitted, but the course will not refer the matter for further disciplinary action except in cases of repeated acts.

Reasonable

  • Communicating with classmates about problems in English (or some other spoken language), and properly citing those discussions.
  • Discussing the course’s material with others in order to understand it better.
  • Helping a classmate identify a bug in their code at office hours, elsewhere, or even online, as by viewing, compiling, or running their code after you have submitted that portion of the problem yourself. Add a citation to your own code of the help you provided and resubmit.
  • Incorporating a few lines of code that you find online or elsewhere into your own code, provided that those lines are not themselves solutions to assigned problems and that you cite the lines’ origins.
  • Sending or showing code that you’ve written to someone, possibly a classmate, so that he or she might help you identify and fix a bug, provided you properly cite the help.
  • Submitting the same or similar work to this course that you have submitted previously to this course or another CS50-related course (including on edX).
  • Turning to the web or elsewhere for instruction beyond the course’s own, for references, and for solutions to technical difficulties, but not for outright solutions to problems.
  • Using CS50’s own AI-based software, including the CS50 Duck (ddb) in cs50.ai and cs50.dev as well as in Ed.
  • Whiteboarding solutions to problems with others using diagrams or pseudocode but not actual code.
  • Working with (and even paying) a tutor to help you with the course, provided the tutor does not do your work for you.

Not Reasonable

  • Accessing a solution to some problem prior to its deadline.
  • Accessing or attempting to access, without permission, an account not your own.
  • Asking a classmate to see their solution to a problem before its deadline.
  • Discovering but failing to disclose to the course’s heads bugs in the course’s software that affect scores.
  • Decompiling, deobfuscating, or disassembling the staff’s solutions to problems.
  • Failing to cite (as with comments) the origins of code or techniques that you discover outside of the course’s own lessons and integrate into your own work, even while respecting this policy’s other constraints.
  • Giving or showing to a classmate a solution to a problem when it is he or she, and not you, who is struggling to solve it.
  • Manipulating or attempting to manipulate scores artificially, as by exploiting bugs or formulas in the course’s software.
  • Paying or offering to pay an individual for work that you may submit as (part of) your own.
  • Providing or making available solutions to problems to individuals who might take this course in the future.
  • Searching for or soliciting outright solutions to problems online or elsewhere.
  • Splitting a problem’s workload with another individual and combining your work (unless otherwise explicitly allowed)
  • Submitting (after possibly modifying) the work of another individual beyond the few lines allowed herein.
  • Submitting the same or similar work to this course that you have submitted or will submit to another.
  • Submitting work to this course that you intend to use outside of the course (e.g., for a job) without prior approval from the course’s heads.
  • Using AI-based software other than CS50’s own (e.g., ChatGPT, GitHub Copilot, Bing Chat, et al.) that suggests or completes answers to questions or lines of code.
  • Viewing another’s solution to a problem and basing your own solution on it.

Acknowledgement and Authorization

Harvard plans to record audio, photos, and video of Computer Science 50 (CS50) lectures, sections, office hours, seminars, and other events and activities related to CS50 (the “Recordings”), with the aims of making the content of the course more widely available and contributing to public understanding of innovative learning (the “Projects”). As part of the Projects, the Recordings, or edited versions of them, may be made available to other Harvard students, to students at other educational institutions, and to the broader public via edX, the Internet, television, theatrical distribution, digital media, or other means. One of the ways it is expected that the Recordings, or edited versions of them, will be made publicly available is under a Creative Commons Attribution-NonCommercial-ShareAlike (CC BY-NC-SA) license. Another example is that Harvard may make and disseminate montages of “memories” from the class with images from the Recordings. The Recordings also may be used to make other derivative works in the future. Students may elect not to appear in photos and video used in the Projects and may still participate fully in CS50.

To attend CS50, you will need to sign online an Acknowledgement and Authorization in the following form:

I understand and agree that, if I do not wish any photos or video of me to be used as part of the Projects:

  • If I am participating in CS50 in a classroom or other course location, I should sit in the designated “no-film” zone of the classroom or location, and should not walk in the field of view of the cameras.
  • If I am participating in CS50 online, I should turn off my own camera and should not display a photo of myself. In addition, if I do not wish my real name to be displayed when I speak and my voice is recorded, I should select a pseudonymous user name in Zoom (or other online service). If I select a pseudonymous user name, I will inform the instructor, so the instructor knows who I am.

I understand that I am free not to be included in the Projects’ photos and video in this way, and that this will not affect my grade or my ability to participate in course activities.

Unless I exclude myself from the Projects’ photos and video as described above and take any other steps outlined by the instructor to avoid being filmed, I authorize Harvard and its designees to make and use Recordings of my participation in CS50 and activities related to CS50. I understand and agree that the Recordings may include my image, name, and voice. I also understand and agree that, even if I opt out of the Projects’ photos and video and choose a pseudonymous user name, my voice will be recorded if I am participating online, and may be picked up by microphones outside the “no-film” zone if I am in a CS50 classroom or other location, and my spoken name also may be included in the Recordings. If the class is online, I may participate instead via chat messages, which will not be included in the Recordings.

I understand and agree that Harvard and its designees will have the irrevocable, worldwide right to make, edit, modify, copy, publish, transmit, distribute, sell, publicly display, publicly perform, and otherwise use and make available the Recordings and any other works that may be derived from those Recordings, in any manner or medium now known or later invented, in connection with the Projects, and to authorize others to do so as well. I hereby transfer to Harvard any rights, including copyrights, I may have in the Recordings that Harvard makes. I will remain free to use and disseminate any ideas, remarks, or other material that I may contribute to course discussions.

I acknowledge and agree that I will not be entitled to any payment, now or in the future, in connection with the Recordings or any works derived from them. This Acknowledgment and Authorization is a binding agreement, and is signed as a document under seal governed by the laws of the Commonwealth of Massachusetts.

Unless you exclude yourself as described in the Acknowledgment and Authorization, you are agreeing, by attending CS50, that your participation in CS50 and related activities may be recorded and used by Harvard in connection with the Projects without further obligation or liability to you, even if you do not sign any authorization.

If you have any questions about the above, contact recordings@cs50.harvard.edu.

Acknowledgements

Special thanks to…

  • Varsha Venkatasubramanian for writing the course’s notes
  • Patrick Thornton for laying the groundwork for the course’s automated tests
  • Andrew Holmes, Bobby McCarthy, Brenda Anderson, Margaret Zenke, and Yuliia Zhukovets for testing the course’s problems