CS145 - Autumn 2009
Introduction to Databases
Assigned Work
There are four different types of assigned work in CS145:
  1. Automated exercises and SQL labs using Gradiance

  2. Written challenge problems

  3. Two standalone query assignments, one using an interpreter for relational algebra, the other using XPath, XQuery, and XSLT on the Saxon system

  4. A three-part programming project, using the MySQL database system and the PHP scripting language
The following is a tentative schedule for the assigned work. Over time, dates will be firmed up and links to actual assignments will be added.

AssignedDue
(11:59pm)
WorkTopicsFAQ
Tue. Sept. 29 Mon. Oct. 5 Gradiance Exercises #1 (2 sets)
RA Query Assignment
Relations, XML,
Relational algebra
--
Tue. Oct. 6 Mon. Oct. 12 Gradiance SQL Labs
Challenge Problems #1
Relational algebra, SQL --
Tue. Oct. 13 Mon. Oct. 19 XML Query Assignment XPath, XQuery, XSLT XML Query FAQ
Tue. Oct. 20 Mon. Oct. 26 Gradiance Exercises #2 (3 sets)
Challenge Problems #2
Relational design --
Tue. Oct. 20 Mon. Nov. 2 Project Part 1 (2 weeks) -- Project 1 FAQ
Help session slides
Tue. Nov. 3 Mon. Nov. 9 Gradiance Exercises #3 (2 sets)
Project Part 2 (1 week)
UML,
Constraints and triggers
Project 2 FAQ
Tue. Nov. 10 Mon. Nov. 16 Gradiance Exercises #4 (2 sets)
Challenge Problems #3
Transactions,
Indexes, Views
--
Tue. Nov. 10 Thu. Nov. 19 Project Part 3 (1.5 weeks) -- Project 3 FAQ
Tue. Nov. 17 Thu. Dec. 3 Gradiance Exercises #5 (3 sets)
Challenge Problems #4
Authorization, Recursion,
Warehousing & Mining
--

Automated Exercises and SQL Labs
(20% of your final grade)
The purpose of the automated exercises and SQL labs is to ensure that you have learned the basic material in CS145. You will perform the exercises and labs using
Gradiance. Gradiance was launched at Stanford in a 2002 offering of CS145, and is now a commercial product partenered with Pearson Education.

Gradiance exercises are based on "root questions," from which the system generates different instances of the exercises each time you try an assignment. Thus, you can test yourself on the same exercises multiple times, and you receive immediate feedback for each attempt. The Gradiance SQL Lab component automatically tests assigned SQL queries for correctness against a real database, and provides immediate feedback. Overall, using Gradiance avoids many shortcomings of the traditional submit-and-then-wait-for-grades approach, while allowing you to perform assignments as many times as you wish in order to ensure you've mastered the material. We strongly encourage you to continue testing on each topic until you complete the assignment with a 100% score at least once.

For Gradiance exercise sets, your score is the highest score achieved as of 11:59pm on the due date. For Gradiance labs, your score is the most recent score achieved as of 11:59pm on the due date. There is no late allowance for Gradiance work.

Challenge Problems
(7% of your final grade)
Challenge problems are more difficult and open-ended than the exercises and labs in Gradiance. 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.)

We ask you to type up your solutions to the challenge problems and submit them electronically. (Details are provided with the assignments, and students who strongly prefer to hand-write their solutions may scan them for submission.) The late policy for challenge problems is outlined below.

Standalone Query Assignments
(8% of your final grade)
You will do two standalone query assignments, independent of the programming project. In the first one (4% of your final grade), you will write relational algebra queries and execute them using a relational algebra interpreter called ra. The ra system was developed by
Prof. Jun Yang at Duke University. In the second assignment (also 4% of your final grade), you will develop and run queries over XML data sets using the XPath, XQuery, and XSLT languages supported by the open-source Saxon system. The late policy for the query assignments is outlined below.

Programming Project: AuctionBase
(20% of your final grade)
Your primary programming project is to build an online auction system called AuctionBase. At the back-end, AuctionBase manages all of its data using the MySQL database management system. At the front-end, AuctionBase provides a friendly web interface to its users. 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, the sky's the limit. 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 the MySQL DBMS 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 TA's, 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 all students will use the open-source MySQL relational database management system 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.

We will assume students are proficient already with Unix and Java, but we are not assuming familiarity with web or database programming -- help sessions will be provided. (See Help Sessions in the Administrative Information page.)

In general, students are welcome to use alternative languages, systems, and tools if they wish. However, only MySQL and PHP on the Stanford Unix Myth 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 an XML parser in Java for processing the initial XML data, but students may use other tools or 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 TA's must be able to compile and run all submitted code on the Stanford Unix Myth machines without any additional packages or runtime support, and with no additional effort over that required for projects using the supported languages and tools.

Project Parts

The AuctionBase project proceeds in three parts. The schedule for assignment and completion of project parts is specified in the table at the top of this page.

Late Policy

THIS LATE POLICY WILL BE STRICTLY ENFORCED.

Regrade Policy
Gradiance work cannot be regraded (but if you find a significant technical error in Gradiance exercises or labs you'll definitely receive extra credit). If you believe you deserve a regrade in other work, please send an email message to cs145@cs 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 Gradiance exercises and labs independently, and to submit your own original work for challenge problems, query assignments, and the programming project. On many occasions when working on assignments (but never exams!) it is useful to ask others -- the instructor, the TA's, 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 Gradiance exercises, Gradiance lab queries, 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.