CS145 Introductory Information


Finding This Document
Course Goals
Time and Place
Course Personnel and Office Hours
Course Texts
Email Help
Course Mailing List
Course Project
Grading Policy
Limits on Requests for Exceptions
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

The purpose of this course is to offer the student an introduction to the design and use of database systems. We cover 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 (the object-oriented database standard), PSM (really Oracle's procedural PL/SQL), JDBC (the Java interface to SQL databases, and XML (the most popular way to create structured data with semantics). A Course Outline is available.

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.

Time and Place

The class meets Tuesdays and Thursdays, 9:30 - 10:45AM, in B03 Gates.

We shall run a ``help session'' on Fridays, 2:15 - 3:05PM, in Skilling 191. It is televised on channel E2. There will be no session on Friday Sept. 28.

Course Personnel

PersonRoleOfficePhoneOffice HoursEmail
Jeffrey D. UllmanInstructor 411 Gates(650) 725-4802 MW 10:30 AM - noon; but 11/12, 1:30-3PM, insteadullman @ cs.stanford.edu
Siva Gaggara TA 2nd Floor, Sweet Hall (650) 740-4305 M 8 - 9:30 PMgsiva @ cs.stanford.edu
Antonios Hondroulis TA B26A Gates (650) 723-6319 Th 08:00 AM - 09:30 AM & 2:30 PM - 4:00PMaxon @ cs.stanford.edu
Henry Hsieh TA B26A Gates (650) 723-6319 MW 2:30 - 4 PMhenrish @ cs.stanford.edu
Masood Siddiqi TA B24B Gates (650) 736-1816 MF 5 - 6:30 PMmasood @ cs.stanford.edu
Sarah WedenCourse Administrator419 Gates(650) 725-3358N/Asweden @ db.stanford.edu


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 ar Oracle-8 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.


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

These books are being printed in September, 2001, and we expect them to be express-shipped to the Stanford Bookstore on Oct. 1, 2001. The first two chapters can be Downloaded for Free.

Since we are going to be using the Oracle system, you may also wish to purchase one of several Oracle manuals. I got myself a copy of:

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. Understanding the New SQL: A Complete Guide J. Melton and A. R. Simon, Morgan-Kaufmann, 1993.

  2. A Guide to the SQL Standard C. J. Date and H. Darwen, Addison-Wesley, 1999. It is more succinct than the Melton-Simon 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.

Email Consulting

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

We may be trying a system in which a network of schools share this resource for appropriate questions. Our goal is to decrease the average delay in getting you a response. More wil be announced later.

Class Mailing List

We shall use a class mailing list, cs145-all @ lists. You should send the message
subscribe cs145-all
to majordomo @ lists.stanford.edu. The message should come from your preferred mail-reading host.

We hope that messages to this list will be limited to notes of general interest to the class. In most circumstances, you should use the cs145-help list mentioned above in order to have a question about the course material answered.

Note: do not try to subscribe to the cs145-help list if you are not a TA for the class.

Course Requirements


A feature (or bug?) of CS145 is that everyone writes their own database application. 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.

Written Homework

Some conventional homework questions will be assigned each week, along with a step of your database application. Homeworks will generally be due on Tuesdays, except after Thanksgiving, when we'll switch to Thursdays.

This year, we're going to try a homework strategy similar to that used in the Spring version of CS145. We'll adopt the philosophy that the purpose of written homework is to encourage you to keep up with the material, and not count it very much in the final grade. Each problem will be graded with only a check (more-or-less right), minus (small error or errors), and X (substantially wrong). We shall publish a solution sheet, but will also discuss the solutions at the help session on Fridays. That will be your opportunity to see the problems worked out and discuss alternative correct answers.

No late homeworks 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.

Reminder: Save your homeworks as we return them, in case there is an error in the way we record grades and you ask for redress.


Midterm: In class, plus overflow rooms TBD. Tentatively, the midterm is scheduled for Tuesday, Nov. 6, 2001. TV students may take it at work or in class (their choice, unless your site does not administer exams).

Final: On campus, location to be determined, Wednesday, December 12, 12:15PM. All local TV students must come to campus for the final. Please do not ask for a makeup final or early final.

Grading Policy

The approximate weights of the four components are:

Written Homework15%

Student Responsibilities

Please take your obligations in this course seriously. The rule regarding late homeworks was already mentioned, and you are also expected to take the exams when they are given. For example, please do not tell me that you have already booked a ticket home for the holidays and can't take the final at the time everyone else takes it. Also, please do not schedule any extended trips, including business trips, during the time classes are in session. If you must do so, it is your responsibility to get the work in on time. If you are an SITN student, and you want me to talk to your supervisor about the importance of timely participation in this course (and others), I will do so. However, it is not in your best interests to accept the model that your job assignments take priority over your studies.

I know this section sounds like an old curmudgeon grousing, but every year I get a large number of requests for exceptions and postponements. If the reason for the exception is medical, you have my complete sympathy and cooperation. However, most nonmedical excuses do violence to my obligation to run a fair course. For instance, taking the final before or after the regular period would give you a huge advantage against students who must take all their finals in a short timespan. (An exception is a case where you are asked to take 3 finals within a 24-hour period; then, the University gives you the opportunity to postpone one of the exams, and I support this position.)

Another reason why we have to keep everyone together is that it is important to be able to publish solutions to assignments and exams in a timely manner. We cannot do so if people are given extensions of the deadline. Especially, if you are a remote SITN student, we're happy to have you in the class, but it is important for the reason just described that you keep no more than 48 hours behind the class. SITN has in the past been willing to send out tapes or allow downloads almost immediately, but if they don't, first ask them, and if that doesn't work, ask me.

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.

We shall not deduct credit for small amounts of acknowledged assistance. Even working as a team on one of several problems in a problem set may not hurt your grade, as long as all members of the group acknowledge their collaboration. Such shared interest can be beneficial to all concerned. We do reserve the right to give less than full credit in circumstances where it appears that there has been large-scale division of labor, and you are not getting as much learning out of the assignment as you should. However, as long as you acknowledge your sources, you cannot get into Honor-Code trouble.

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.