CS145 - Introduction to Databases
Spring 2000, Prof. Widom
The course Web site will be accessible as http://cs145.stanford.edu.
Index into this document
CS145 provides the student with a comprehensive introduction to the
design of databases and the use of database management systems for
applications. We will cover the entity-relationship (E/R) and
relational data models and approaches to database design, including
functional dependencies and normal forms. Abstract query languages
such as relational algebra will be discussed, along with extensive
coverage of SQL - the standard language for creating, querying, and
modifying relational and object-relational databases. We will cover a
variety of other issues important to database designers and users,
including views, integrity constraints, triggers, transactions, and
security. We will also cover object-oriented database design and
query languages including the ODMG standard. Finally, time
permitting, we will consider advanced topics such as data warehouses,
data mining, XML, and Web/database interactions. Written work in all
topics is complemented by a comprehensive, individual database application programming project.
This course is aimed at database design and use, and the
implementation of database applications. It does not cover the
implementation of database management systems. The latter topic is
covered in the follow-on courses CS245 and CS346.
- Instructor: Jennifer Widom
Gates Building room 422
TA's: Ting-I Cheng, Vincent Chu, Nate Folkert, Stephen Lindholm
Office hours, location, phone
Administrator: Marianne Siroker
Gates Building room 436
The course meets Mondays and Wednesdays, 11:00-12:15, in Gates B01
There will also be a help session most weeks on Friday, 3:15-4:05,
in McCullough 150 (televised live on channel E3). The session will be
conducted by one of the TA's and is optional but recommended. During
the session, the TA will work problems and/or answer student
questions, but the TA will not deliver a prepared lecture.
These prerequisites are a guide but not an absolute requirement.
CS145 should be accessible to anyone with a solid Computer Science
foundation that includes a reasonable amount of programming (as in
CS107) and knowledge of basic Computer Science theory (as in
CS103/CS109). For the programming project, we
will assume prior knowledge of Unix and C.
- CS107: Programming Paradigms
- CS103 or CS109: Discrete Math / Introduction to Computer Science
There is one required book for the course:
Students may also opt to purchase a book about the SQL database
language, although you should be aware that Oracle's version of SQL,
which we will be using, may differ slightly. One reasonably good SQL
- A First Course in Database Systems
J.D. Ullman and J. Widom, Prentice Hall, 1997
Book Web site
There are numerous other books on SQL available, as well as an entire
shelf at the Stanford Bookstore devoted to books on Oracle. Copies of
the textbook and the SQL guide mentioned above are on reserve at the
Math and CS library (Building 380, 4th floor).
- A Guide to the SQL Standard (4th edition)
C.J. Date and H. Darwen, Addison-Wesley, 1997
All inquiries regarding the course should be sent to
email@example.com. This address is monitored
continuously by the course staff. CS145-related messages sent
directly to the instructor or to a TA will not be handled. In the
case where a message is intended for a specific staff member, the
message should still be sent to cs145-staff@cs, indicating
the intended recipient. The message will be forwarded accordingly.
We will also maintain a class mailing list,
firstname.lastname@example.org. This list will be used
primarily for the staff to communicate with the students, although
students may feel free to post on this list as well. We require all
students to place themselves on this mailing list, and we will not
hesitate to use the list to convey important and timely information.
To sign up for the list, send a message to
email@example.com with "subscribe
cs145-all" as the body of the message. Be sure to send the
message from your preferred mail-reading host.
To keep the volume of email manageable, we will maintain
comprehensive and up-to-date Frequently-Asked Question (FAQ) lists,
linked to the course home page. There will be a general FAQ, as well
as a FAQ for each assignment and exam. Before sending an inquiry
to cs145-staff@cs or cs145-all@lists,
please be sure to review the relevant FAQs.
There will be seven written assignments. Written assignments will be
given out on Wednesdays and will be due the following Wednesday.
There will be a written assignment due every full week except the
first one and the week of the midterm exam. Written assignments
should be turned in during class or at the course secretary's office:
Gates Building room 436.
A main component of CS145 is that everyone creates their own
significant database application from scratch. The project is divided
into seven parts. You will start by selecting your application, then
designing the database, obtaining and loading your data into a real
database management system, and writing a number of SQL queries,
client programs with embedded SQL queries, and exercising other
features of SQL. New this year, as the final part of the project you
will create a simple Web interface to your database application.
Project parts will be assigned on Mondays and will be due the
following Monday (with the exception of the last part, which is due on
a Wednesday). There will be a project part due every full week except
the first one and the last one. Most parts of the project will either
be written (the first two parts), or scripts will be turned in on
paper; some parts may be turned in electronically. Parts not
submitted electronically should be turned in during class or at the
course secretary's office: Gates Building room 436.
The programming portion of the project will use the Oracle
relational database management system (Oracle 8i, version 8.1.5), the
Unix operating system, and the C, C++, and/or Java programming
language. Oracle, C/C++, and Java are available on the Sun Solaris
workstations on the second floor of Sweet Hall, e.g., the
elaine and epic machines. To open an account on these
machines, type open at the login: prompt and follow
the instructions. SITN students can access the Sun workstations
remotely via dial-in or telnet. We will assume that students are
proficient already with Unix and C. C++ and Java are not required,
but may be allowed (logistics permitting) for those who wish to use
If you have access to an Oracle 8i system including PL/SQL and Pro*C,
you may use it instead of the Stanford system. However, we do expect
you to use Oracle and not some other DBMS - not because we love
Oracle, but because we are going to be exploring some very specific
capabilities of this system. If you choose to use your own
workstation and/or your own Oracle system, please be aware that we
cannot make any exceptions for problems incurred by using your own
computing facilities rather than those provided by Stanford.
It's easy to get lost in a class of 100-200 students, and it's easy
for the course staff to lose track of the truly motivated and
outstanding students. We're instituting three mechanisms geared to
give students an opportunity to shine: student grading,
project contest, and A+ letter-and-lunch.
We will hire students from the class to assist in grading the written
assignments. If you sign on to be a student grader you can expect
Grading sessions will be conducted by one of the TA's and will be held
weekly starting in the late afternoon. Dinner will be provided, and
students will be paid at the usual hourly grader rate ($11.50-$12.50
per hour; check with Claire Stager, firstname.lastname@example.org,
for details and visa restrictions). If you are interested in being a
student grader, please send a message to
email@example.com indicating your interest, and
listing the Computer Science courses you have taken at Stanford and
the grade you received in each one. Graders will be retained
throughout the course provided they do a good job with grading and
maintain a good standing in the course.
At the end of the course we will select the four best projects as
contest winners. Admittedly the decision of which project is "best"
is by nature subjective, but we will do our utmost to select the four
projects that we believe are the most interesting, novel, challenging,
and robust. The benefits of winning are:
- Intimate knowledge of problem solutions and common mistakes
- You will be given the option of discussing and demonstrating
your project to the entire class at the last class session.
- You will receive a 10% boost in your project grade.
- You will be given the opportunity to package a comprehensive
description of your project to be included on the Web site for the
Ullman/Widom textbook, for which the book publisher will pay a
Students earning an A+ in the course will receive a personal letter of
congratulations from the instructor, along with an invitation to enjoy
lunch with the instructor and the other A+ students at the Stanford
faculty club. The A+ students also will be top candidates
for CS145 TA positions in subsequent offerings of the course.
THIS LATE POLICY WILL BE STRICTLY ENFORCED.
- On-campus students: All assignments must be turned in by
5:00 PM on the due date (either Monday or Wednesday). Assignments
less than 24 hours late will be penalized 10%. Assignments more than
24 but less than 48 hours late will be penalized 30%. No assignments
will be accepted more than 48 hours late.
- SITN students: Assignments due on Monday (respectively
Wednesday) must be timestamped by the Tuesday (respectively Thursday)
courier. Late assignments timestamped by the Wednesday (respectively
Friday) courier will be penalized 20%. Assignments timestamped later
than Wednesday (respectively Friday) will not be accepted.
Assignments not sent by SITN courier are subject to the late policy
for on-campus students specified above. No late assignments are
permitted for remote SITN students.
- For emergencies: Since emergencies do arise, each
student is allocated four "chits". Each chit may be used to turn in a
single assignment up to 24 hours late with no penalty, or two chits
for up to 48 hours late. For SITN students, two chits are required to
turn in an assignment one courier-day late. As with penalized late
work, no assignments will be accepted more than 48 hours (or one
courier-day) late. We'll keep track of your chits automatically.
- Electronic submissions: Students may not turn
assignments in electronically, except for project parts for which
electronic submission is required.
The midterm exam will be held on Wednesday May 3, in class at the
regular time. The final exam will be held on Monday June 5 from
8:30-11:30 AM (location to be announced). Alternative or make-up
exams will not be given. All on-campus and SITN students must
attend the midterm and final exams on the Stanford campus at the
scheduled time and place.
The components of the final grade will be distributed as follows:
- Written Assignments: 15%
- Project: 30%
- Midterm exam: 20%
- Final exam: 35%
Under the Honor Code at Stanford, each of you is expected to submit
your own work in this course, including written assignments,
programming assignments, and exams. On many occasions when working on
assignments it is useful to ask others (the instructor, the TA's, or
other students) for hints or debugging help, or to talk generally
about the written problems or programming strategies. Such activity
is both acceptable and encouraged, but you must indicate on both your
written and your programming assignments 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 and being
able to explain on your own all written and programming solutions 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.
While we understand the significant demands of taking a course while
working, we would like to make it clear at the outset that no special
exceptions can be made for SITN students. Local SITN students must
follow the lectures, turn in the assignments, and attend the exams on
exactly the same schedule as on-campus students. Please ensure in
advance that you will not have any business trips or important
deadlines that conflict with the course, since no exceptions will
be made. Also note that like on-campus students, for emergencies
you are allocated four unpenalized late days for assignments (see late policy).