CS145 - Spring 2002
Introduction to Databases
- The midterm exam will be held on Monday May 6 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 '01 offering
of CS145) is linked to the Exams page.
- SCPD Students: Please be sure to bring a route slip
with you to the exam. If you do not bring a routing slip, 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 5
from 4:00-5:30 PM in Building 380 room 380Y. Please bring questions.
The review session will not be televised.
The exam will cover:
- All lectures through Wednesday May 1
- All required readings from the Course Schedule so far
- Assignments #1-3
Since the material on indexes, views, and entity-relationship (E/R)
diagrams (covered in class and in the readings) has not yet been
exercised in an assignment, any questions regarding this material on
the exam will be straightforward.
What follows is an outline of the material we've covered so far.
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, join operations
- Data modification: insert, delete, update
- Programming with SQL
- Embedded SQL, shared variables, cursors
- Stored procedures (PSM)
- 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
- Indexes (minimal coverage if any)
- Properties and uses of indexes
- Creating indexes in SQL
- Views (minimal coverage if any)
- Creating and using views
- Modifying views
- Materialized views
- Entity-relationship model and E/R diagrams (minimal coverage if any)
- Entity sets, relationships, attributes, keys, roles
- Multiplicity of relationship sets (one-to-one, one-to-many, etc.)
- Weak entity sets
- Subclasses ("isa" relationships)