CS145 Introductory Information

Index

Finding This Document
Course Goals
Time and Place
Course Personnel and Office Hours
Prerequisites
Course Texts
Email Help
Course Mailing List
Course Newsgroup
Course Project
Homework
Exams
Grading Policy
The Honor Code

Finding This Document On-Line

The class Web page is http://www.stanford.edu/class/cs145. You can find a link to this document and all other course material there. This introductory material can be obtained directly as: http://www.stanford.edu/class/cs145/intro.html Note that this and the outline page are ``living documents''; they can be expected to change during the quarter, and the ``official'' contents are whatever the on-line version has, not the hardcopy handed out at the beginning of the course.

This and other documents may be available in hardcopy form at the ``handout hangout'' between the A and B wings on the 4th floor of Gates. Whatever is not picked up in class will appear there, but we shall not restock the supply once it is gone.

Course Goals

CS145 is an introduction to the design and use of database systems --- systems that manage very large amounts of data. There are two important approaches to organizing and querying (asking questions about) data: the "relational model," which uses a two-dimensional table (relation) as its primary structure, and the "semistructured model," which uses trees as its fundamental structure. The relational model underlies the major commercial database systems. We cover relational design using the entity-relationship model, followed by an overview of the relational model, how to convert E/R models to relations, and how one uses a relational database system to create a database. SQL (Structured Query Language), the standard query language for relational databases, will be learned and experienced.

We shall also learn some other database languages, both concrete and abstract, including relational algebra, Datalog, ODL/OQL PSM (really Oracle's procedural PL/SQL), and JDBC (the Java interface to SQL databases). In addition, we study recent object-oriented influences on the relational model, including the object-oriented database standard ODL/OQL. The semistructured model is newer, but beginning to have significant influence, especially as people try to integrate data and share data over the Web. We shall learn XML, the standard for structuring data as trees. We also shall meet XPath, a rudimentary query language for XML data, and XQuery, a new, more SQL-like query language for XML. It is not our goal to study database system implementation (e.g., how to build a system that processes SQL queries efficiently). Study of that very important subject begins in CS245.

A Course Outline is available.

Time and Place

The class meets Tuesdays and Thursdays, 2:45 - 4PM, Skilling Aud.

Course Personnel

PersonRoleOfficePhoneOffice HoursEmail
Eric Sirianni TA B24B Gates (650) 736-1816 Mon 2:30 - 4:00; Tues 1:00 - 2:30 esiriann @ stanford . edu
Marianne Siroker Course Administrator 435 Gates (650) 723-0872 N/A siroker @ db . stanford . edu
Sarah Solter TA B24B Gates (650) 736-1816 Wed 12:30 - 2:00; Fri 3:45 - 5:15 sbsolter @ stanford . edu
Jeffrey D. Ullman Instructor 433 Gates (650) 725-4802 After classes until 5:15. Also by arrangement. ullman @ gmail . com

Prerequisites

CS107 (programming languages) and CS103 (introductory CS theory) are expected. Please discuss the matter with the instructor if you do not have something like these courses.

Programming assignments will use the Oracle relational database management system and the C or C++ programming language. Java is an alternative. The Oracle system can be accessed via any of the Unix workstations on the second floor of Sweet Hall, e.g., the ``elaines'' or ``epics.'' To open an account on these machines, type open at the login: prompt and follow the instructions.

We shall assume that students already are proficient with Unix and C.

SITN students can access the Unix workstations remotely via dial-in (try 650-325-1010) or telnet. If you have access to an Oracle-9 system including PL/SQL and Pro*C, you may use that. We have to be sticky about what system you use not because we love Oracle, but because we are going to be exploring some very specific capabilities of this system, and it will present problems for you and us both, if you do not have all these features. We cannot make any exceptions for problems incurred by using your own computing facilities rather than those provided by Stanford.

Everyone must have a leland account in order to use the class Oracle database system for the PDA. To obtain a leland ID, telnet to open.stanford.edu and use login name open. If you are an SITN student but do not yet have a Stanford ID, you need to talk to your SITN contact and get one before trying to open a leland account.

Textbooks

The text for the course is Database Systems: A First Course (Second Edition, "Value Pack") J. D. Ullman and J. Widom. However, if you are planning eventually to take CS245, you should instead get Database Systems: The Complete Book by H. Garcia-Molina, J. D. Ullman, and J. Widom, also in the "Value Pack" form. The former is the first 10 chapters of the latter.

The first two chapters can be Downloaded for Free if you are not sure you are going to take the course.

Important: We have made an arrangement with the publisher, Prentice-Hall, to support free Gradiance accounts for those who buy either the required text or its alternative above. However, you must buy the "value pack," which contains the book and a scratcher with a secret number to use to open your account.

Since we are going to be using the Oracle system, you may also wish to purchase one of several Oracle manuals. Examples:

Students may also wish to purchase manual for the SQL standard, although this SQL is not quite identical to the version of SQL supported by Oracle. Three recommended books are:

  1. SQL:1999 - Understanding Relational Language Components J. Melton, A. R. Simon, and J. Gray, Morgan-Kaufmann, 2001.

  2. A Guide to the SQL Standard C. J. Date and H. Darwen, Addison-Wesley, 1999. It is more succinct than the Melton-Simon-Gray book, but I personally find it a more useful summary of the SQL language.

  3. SQL3 Complete, Really Peter Gulutzan and Trudy Pelzer, CMP Books. This book is really fat, but it is fairly complete.

Class Mailing List

Stanford will set up a list cs145-aut0405-students @ lists.stanford.edu. If you are registered for CS145, you should appear on this list automatically. If you want to get class announcements but are not registered for the class, send mail to majordomo @ lists.stanford.edu with a body:

subscribe cs145-aut0405-guests

Email Consulting

If you need a quick answer to a question, try sending email to cs145-aut0405-staff @ lists.stanford.edu. This list forwards to the TA's and instructors, and with luck you'll get a reply in a few minutes.

Please do not use cs145-aut0405-students for questions.

Class Newsgroup

Another way of getting help on coursework is through the class newsgroup: su.class.cs145. The staff will monitor the newsgroup on (at minimum) a daily basis and post responses to questions for all students to read. You are encouraged to check the newsgroup before emailing the staff list as your question may have already been answered.

Course Requirements

Project

A feature (or bug?) of CS145 is that everyone writes their own "personal database application" (PDA). You do some work on the project each week, beginning with selecting your application, designing the database, obtaining and loading your data into a real database management system, and finally writing a number of SQL queries, C programs with embedded SQL queries, and exercising other features of SQL.

The first PDA assignment will be due Thursday, Oct. 14, but must be preceded by a review of your design by one of the course staff. Subsequent parts will generally be due on Thursdays, with the exception of Thanksgiving.

No late work will be accepted. However, each student is allowed one extension of at most 48 hours. This amount of time cannot be divided among assignments; it applies to one assignment only.

Gradiance Homework

We are going to use the Gradiance On-line Accelerated Learning system to give periodic assignments. These will be either multiple-choice questions to answer, or later in the course, SQL or XQuery queries to write. You will be given a week or more to log in and do each assignment. There may be an assignment due before each class; they tend to be small, so the total work should not overwhelm you.

Gradiance homework is somewhat different from what you may be used to. The Student Guide has a number of suggestions to help you get the most out of the system. Although you see multiple-choice questions, there is really an underlying "long-answer" question behind each. You should work out the long-answer question and have the answer in front of you. Sometimes, the "long answer" is really an algorithm for solving instances of the question quickly. The particular choices of answer that you get in effect form a sample of the long answer, so we can check you really were able to work out the problem.

You should work an assignment until you get a perfect score. Each time you open the assignment, you get a different set of answers from which to choose, and the order of the questions may differ. However, if you have worked out the underlying long-answer problem, you should be prepared to identify the correct answer quickly.

If you submit an assignment and get some wrong answers, you should be able to see a hint or general advice regarding why the answer is wrong and/or how to work the problem. After the due date, you can look at your most recent submission and see a general explanation for the problem, as well as information about anything you still got wrong.

In order to use Gradiance, you need to sign up for an account. Go to www.gradiance.com/PH and open your account. You can then register for your Gradiance account for CS145 at the same Web site. The identification for the class is by a token that I will tell you about in class, but which is not going to be published on the class Web site. The reason is that I don't want random people who are not in the class registering. At the time you register for CS145 at Gradiance, you will be asked to provide the ID from your "Value Pack." If you don't want to buy the book, you will be asked to pay $20 for the Gradiance account.

Note: Since the instructor is conflicted several ways in this process, no one in CS145 will be required to buy the book or pay for a Gradiance account. The alternative is that, whenever there is a Gradiance assignment, you can pick up in class or from Ms. Weden a written version of the assignment. Just work the problems as in any ordinary homework, and hand them in by the due-date/time. They will be graded by the TA's and handed back to you in about a week. Scores will be normalized, so that you will not be penalized or benefitted by your choice to opt out of the Gradiance service.

To find out what assignments are due, and when, either log into your Gradiance account or check the Class Home Page.

Exams

Midterm: The midterm is on Nov. 4, during the class period. SITN students may take the exam from their place of work, if your company permits it (not all do! better check).

Final: All students will have to come to campus, with the exception of remote SITN students, i.e., those whose place of work is more than about 50 miles away (Livermore is "local"; Santa Rosa is "remote," e.g.). Stanford has scheduled the final exam for Monday 12/6 from 3:30 - 6:30 PM.

Grading Policy

The approximate weights of the four components are:

ComponentWeight
Project35%
Homework15%
Midterm15%
Final35%

Honor-Code Policy

The basic presumption is that the work you do is your own. Occasionally, especially when working problem sets or writing programs (but never on exams!), it may be necessary to ask someone for help. You are permitted to do so, provided you meet the following two conditions.
  1. You acknowledge the help on the work you hand in.

  2. You understand the work that you hand in, so that you could explain the reasoning behind the parts of the work done for you by another.

Any other assistance by another person constitutes a violation of the honor code and will be treated as such.

If you have any questions about what this policy means, please discuss the matter with the instructor now. We shall ask everyone to acknowledge that they have read the above material on the first homework.