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 emerging standard), and parts of SQL3 (the next relational standard). We cover the language PL/SQL, which is specific to the Oracle DBMS that we use in the class laboratory, including ``object-relational'' features that allow object-oriented features into relational systems. Finally, we shall cover XML and DTD's (document-type definitions), that is another emerging standard for representing databases as documents, in the HTML tradition. 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 Mondays and Wednesdays 11AM - 12:15PM, B1 Gates.

Course Personnel

PersonRoleOfficePhoneOffice HoursEmail
Jeffrey D. UllmanInstructor 411 Gates(650) 725-4802 Monday 1:30-3:30PM, Friday 11AM-noon ullman @ cs.stanford.edu
Mayank Bawa TA 496 Gates (650) 725-7359 Tuesday, Friday 9:30-11AM bawa @ db.stanford.edu
Karen Grant TA Monday: B24B (650) 736-1816 Monday 3:30-5PM, Thursday 2:45-4:15PM kgrant @ cs.stanford.edu
Thursday: B26B (650) 736-1817
Fang (Grace) Ji TA Gates B26B (650) 736-1817 Monday, Wednesday 9:30-11AM fji @ xenon.stanford.edu
Cheng (Calvin) Yang TA Gates B26B (650) 736-1817 Tuesday 3:30-5PM, Thursday 4:15-5:45PM yangc @ db.stanford.edu
Maria Bharwada Course Secretary419 Gates (650) 725-3358N/Amaria @ cs.stanford.edu


CS107 (programming languages) and CS103B or X or CS109 (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 are proficient already 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-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. Widom and J. D. Ullman, Prentice-Hall, 1997.

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 an SQL2 manual, although SQL2 is not quite identical to the version of SQL supported by Oracle. Two 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 (third edition) C. J. Date and H. Darwen, Addison-Wesley, 1994. It is more succinct than the Melton-Simon book, but I personally find it a more useful summary of the SQL language.

These and several other books will be on reserve at the Math-CS library (Bldg.~380, 4th floor).

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.

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.

Also, 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.


Some conventional homework questions will be assigned each week, along with a step of your database application. Homeworks will generally be due on Wednesdays.

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 Monday, Nov. 6, 2000. TV students may take it at work or in class (their choice).

Final: On campus, location to be determined. The final this year is on Monday, Dec. 11, 2000, 8:30--11:30AM. All local TV students must come to campus for the final. Please do not ask for a makeup final or early final. You should plan to be at the CS145 final and, if you have a conflicting final (e.g., because you are taking two courses that meet at the same time and watching us on TV), arrange to take the other final at a different time.

Grading Policy

The approximate weights of the four components are:


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. Also, 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 gives 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 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.