CS145 - Spring 2003
Introduction to Databases
- The midterm exam will be held on Monday May 5 from 11:00 AM until
12:15 PM in the Gates Building Room B01 (the Hewlett-Packard
Auditorium) on the Stanford campus. All students, including SCPD
students, are expected to attend the exam on-campus. There will be no
early or makeup exams.
- The exam will be closed book. However, each student may bring up
to three pages of prepared notes. That's six total sides of writing
on 8-1/2"x11" paper.
- A sample midterm exam (from Prof. Widom's Spring '02 offering
of CS145) is linked to the Exams page.
- SCPD Students: Please be sure to bring a route form
with you to the exam. If you do not bring a route form we will not be
able to send your graded exam back by courier.
A review session will be conducted by two of the TA's on Sunday May 4
from 7:00-8:30 PM in TCSeq
102. Please bring questions. The review session will not be
televised.
The exam will cover:
- All lectures through Monday April 28 (excluding material on UML)
- All required readings from the Course Schedule through Relational Design
- OTC Exercises/Labs #1,2,3
- Challenge Problems #1,2,3
What follows is an outline of the material we've covered through
Relational Design. All of this material is fair game for the midterm
exam.
- Basic motivation and database terminology
- Relational model
- Relations (tables), attributes (columns), tuples (rows)
- Schema versus instance
- Keys, null values
- XML
- Well-formed XML
- DTDs and valid XML
- ID and IDREF(S) attributes
- Relational algebra
- Basic operators: select, project, Cartesian product, union, difference, rename
- Abbreviations: natural join, theta join, intersection
- SQL
- Data definition: create table, drop table
- Data manipulation: select command
- Subqueries, aggregates, duplicates, null values
- Data modification: insert, delete, update
- XML query languages
- XPath (as covered in lecture and required readings)
- XQuery (ditto)
- Relational database design
- Functional dependencies (FD's): motivation, definitions, rules
- Closure of attribute set with respect to FD's
- Design flaws: redundancy, update & deletion anomalies
- Boyce-Codd Normal Form (BCNF): motivation, definition, decomposition algorithm
- Multivalued dependencies (MVDs): motivation, definitions, rules
- Fourth Normal Form (4NF): motivation, definition, decomposition algorithm