CS145 - Fall 2013
Introduction to Databases
Assigned Work
Assignments in CS145 include four different types of work:
  1. Automated quizzes
  2. Database exercises
  3. Written challenge problems
  4. A three-part programming project
All work in CS145, including the programming project, is completed individually, not as teams.

Automated Quizzes
The automated quizzes are not tricky or deep -- their purpose is to ensure that you have mastered the basic concepts. Each quiz includes several variations, and multiple tries are allowed on each one. You might work through one or two variations at the time of the assignment, saving the others for exam review. Your score for each quiz is the highest score achieved on any variation as of the assignment due date.

Database Exercises
We've developed a comprehensive suite of automated database exercises that help students master a variety of database query and programming languages. The exercises have been very popular with students. All of the exercises include a feedback loop for you to interactively develop, test, and submit your solutions. You are encouraged to repeat the exercises until you achieve a perfect score. In addition to the assigned exercises, for many topics we've created a significant number of additional exercises that can be used for practice. We have automated exercises for the following topics:

For one topic -- SQL recursion -- we do not yet have fully automated exercises, since the only open-source database system supporting recursion does not mesh well with our automated-exercise platform. Your SQL Recursion exercises will be assigned in a conventional (non-automated) fashion.

Challenge Problems
Challenge problems are more difficult and open-ended than the automated quizzes and exercises. The challenge problems are designed to make you think more deeply about the topics covered. Some (but not all) of the problems are by design very challenging. We do not expect most students to completely solve every challenge problem in the course. Grading of challenge problems is on a relatively coarse scale, and credit is given if you make a good attempt at a problem in the right direction. (See Challenge Problem Grading for more details.)

Programming Project: AuctionBase
Your programming project is to build an online auction system called AuctionBase. The project is in three parts, included in three of your later assignments. At the back-end, AuctionBase manages all of its data using the SQLite database management library. At the front-end, AuctionBase provides a friendly web interface to its users through the PHP scripting language. AuctionBase is modeled roughly after the eBay online auction system. In fact, we will give you a considerable amount of real data downloaded from eBay quite some years ago (courtesy of the University of Wisconsin), to initially populate your AuctionBase system.

We will expect certain minimal functionality in each AuctionBase system -- beyond that, possibilities are unlimited. Minimal functionality includes a variety of queries and browsing capabilities over the current items up for auction, the bids on those items, and the sellers and bidders. AuctionBase also must provide a means for entering bids, and for concluding auctions on individual items. Various integrity constraints must be monitored. Although AuctionBase uses SQLite and therefore has transaction support, multi-user issues are not a focus of the project.

Web programming skills are not required for the AuctionBase project. We will provide skeleton PHP code for most aspects of the web interface. Those students savvy in web programming may rewrite or extend the interface as they please.

At the end of the course, there will be a small contest in which we select a few of the best AuctionBase systems to be demonstrated in class and linked to the course home page. No extra credit is given, but winners will be invited to enjoy lunch at the Stanford Faculty Club with Prof. Widom, the TAs, and the other contest winners.

The scope of the AuctionBase project is such that it can easily be completed by each student in the class individually -- partners or teams will not be used.

Programming and System Issues

To develop the project students will use the open-source SQLite relational database management library and the PHP scripting language, running under Unix. (See Interfacing with Stanford's Unix Machines.) An initial part of the project involves standalone parsing and processing of XML data, which is typically done using Java or Python. We will assume students are proficient already with either Java or Python, and we'll provide an early tutoring session for students new to Unix. We are not assuming familiarity with web or database programming -- help sessions will be provided.

In general, students may be able to use alternative languages, systems, and tools for some parts of the project if they wish. However, only SQLite and PHP on the Stanford Unix Corn machines will be supported by the course staff, and the specifications for the project must be met regardless of the languages or tools used. We will provide parser skeletons in Java and Python for processing the initial XML data, and PHP starter code for the web interface, but students may use other languages if they prefer.

Important note: Students using alternative languages, systems, and tools must be able to submit all of their code using the standard submission procedure. Furthermore, the TAs must be able to compile and run all submitted code on the Stanford Unix Corn machines without any additional packages or runtime support, and with no additional effort over that required for projects using the supported languages and tools.

Late Policy


Regrade Policy
Automated quizzes and exercises cannot be regraded (but if you find a significant technical error you'll definitely receive extra credit). If you believe you deserve a regrade in other work, please contact the course staff, explaining precisely why. Please do not ask for a regrade on a challenge problem until you have studied our sample solution. Include your name, @stanford username, and an exact pointer to the work in question. The TA responsible for grading the work will contact you.

Please note that sometimes during regrading we discover a grading error or misjudgement in which too many points were awarded. In this case, your score will be lowered. In other words, a regrade request may result in a higher score, a lower score, or no change.

Honor Code

Under the Honor Code at Stanford, each of you is expected to solve the automated quizzes and exercises independently, and to submit your own original work for challenge problems, non-automated exercises, and the programming project. On many occasions when working on assignments (but never exams!) it is useful to ask others -- the instructor, the TAs, or other students -- for hints, or to talk generally about aspects of the assignment. Such activity is both acceptable and encouraged, but you must indicate on all submitted work any assistance (human or otherwise) that you received. Any assistance received that is not given proper citation will be considered a violation of the Honor Code. In any event, you are responsible for understanding, performing or writing up, and being able to explain on your own, all quiz answers and other work that you submit. The course staff will pursue aggressively all suspected cases of Honor Code violations, and they will be handled through official University channels.

If you have any questions about this policy or about the degree to which we will pursue Honor Code violations, please discuss your concerns with the course staff immediately.