CS145 - Introduction to Databases
Spring 2001, Prof. Widom
Midterm Exam: Logistics and Review
- The midterm exam will be held on Monday May 7 from 11:00 AM
until 12:15 PM in the Gates Computer Science Building Room B01 (the
Hewlett-Packard Auditorium) on the Stanford campus. All students,
including SITN 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 '00 offering
of CS145) is linked to the course home page.
- SITN Students: Please be sure to bring a routing 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 6
from 7:00-8:30 PM in the the Gates Computer Science Building room B12
(across from the usual classroom). Please bring questions. The
review session will not be televised.
The exam will cover:
- All lectures through Wednesday May 2
- Textbook readings: Chapters 1, 2.2-2.3, 2.4.3-2.4.4, 2.5
except 2.5.2, 2.6, 3.1, 3.3, 3.4.2, 3.4.4, 3.5-3.8, 4.1,
4.6.1-4.6.6, 5.1-5.7, 5.9, 7.1, 7.3
- Assignments #1-3
Since the material on programming with SQL (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
- Entity-relationship model and E/R diagrams
- Entity sets, relationship sets, attributes, keys, roles
- Multiplicity of relationship sets (one-to-one, one-to-many, etc.)
- Weak entity sets
- Subclasses ("isa" relationships)
- Relational model
- Relations (tables), attributes (columns), tuples (rows)
- Schema versus instance
- Keys, null values
- Translating E/R designs to relations
- 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
- Relational algebra
- Basic operators: select, project, Cartesian product, union, difference, rename
- Abbreviations: natural join, theta join, intersection
- Bag relational algebra
- Data definition: create table, drop table
- Data manipulation: select command
- Subqueries, aggregates, duplicates, null values, join operations
- Data modification: insert, delete, update
- Properties and uses of indexes
- Creating indexes in SQL
- Programming with SQL: cursory coverage only