CS145 Introductory Information


Course Goals
Time and Place
Course Personnel
Course Texts
Email Help
Course Mailing List
Course Project
Grading Policy
Honor Code Policy

Course Goals

The purpose of this course is to offer the student an introduction to the design and use of database systems. We cover object-oriented and entity-relationship approaches to design, followed by an overview of the relational model, how the OO and E/R models are expressed as 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, OQL (the object-oriented database emerging standard), and parts of SQL3 (the next relational standard). 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 CS245A.

Time and Place

Mondays and Wednesdays 11AM - 12:15PM, B3 Gates.

We also plan a 7:30PM Mondays ``help session,'' which will be run jointly by the TA's in B08 of the Gates building. Note: sessions will not begin until October 6.

Course Personnel

PersonRoleOfficePhoneOffice HoursEmail
Jeffrey D. UllmanInstructor411 Gates(650) 725-48022PM - 3:30PM, Mon. and Fri.ullman @ cs.stanford.edu
Cui, Ying-Wei (Claire)TA 193C Gates(650) 725-3208 Tues. and Fri., 10:30AM-nooncyw @ cs.stanford.edu
Ankur JainTA 193B Gates(650) 723-6077 Tues. and Thurs., 2:30-4PMankur @ cs.stanford.edu
Edwina LuTA 193C Gates(650) 725-3208 3:30-5PM, Mon. and Weds.elm @ cs.stanford.edu
Phyllis WinklerCourse Secretary495 Gates(650) 723-4377N/Awinkler @ cs.stanford.edu


CS 107 (programming languages) and CS 109B (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. 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. (C++ is not required, but it is allowed for those who prefer to use it.)

SITN students can access the Unix workstations remotely via dial-in (try 650-498-1440) or telnet. If you have access to a full-fledged relational database management system that has an SQL interactive interface and a C application programming interface, then you may use that system. However, we will not 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. There is a bookshelf devoted to these books in the Stanford Bookstore, just behind Microdisc. One choice is: Oracle: a Beginners Guide by M. Abbey and M. J. Corey, Oracle Press, 1995. It has chapters on most of the components we are going to use in CS145: SQLplus, PL/SQL, and the Oracle bulk loader, as well as details regarding some SQL matters we shall not cover in detail, such as representing dates. However, a significant fraction of the book is devoted to matters of installing and managing an Oracle installation, which we shall not have to do ourselves. Some copies of this book have been ordered for the course.

Possibly a more promising choice, which Oracle Press says is ``coming soon,'' is A Guide to Using Oracle by J. and M. Morrison. You may also prefer to invest in a guide covering a specific subsystem such as PL/SQL in detail, or ``wing it'' and try to get by with some quick guides that we shall provide you at the appropriate times plus on-line help files and samples.

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. It is in the process of being set up now. When available, you should send the message
subscribe cs145-all YOUR EMAIL
to majordomo @ lists. 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.

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.

Because there were some apparent cases of lost or misappropriated homework in CS145 and other courses last spring, we are going to adopt a more secure system this quarter, and we hope it will not cause major inconvenience. You may give the TA's homeworks in class, or you may deliver the homework to Ms. Winkler's office (495 Gates) by 5PM on the day due. You will there find a sealed box in which to place your homework. Also, if you feel inclined to do so, Ms. Winkler will give you a receipt for your homework, which you can save if there is any dispute about whether work was submitted on time.

SITN students do not have to use this system, since SITN timestamps and records each received piece of work. However, it is the responsibility of each SITN student to get their work delivered with a timestamp on the day due or earlier.


Midterm: In class, Mon., Nov. 3, 1997, 11AM-12:15PM. TV students may take it at work or in class (their choice).

Final: On campus, time and location to be determined (but probably B3 Gates.). All local TV students must come to campus.

Grading Policy

The approximate weights of the four components are:


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 will 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.