DB CS145 - Introduction to Databases
Autumn Quarter 2007

Index

Outline/Readings Class Resources Assignments Past Assignments Lecture Notes Problem Session Notes Announcements

**************************************************************************

Note: We are transitioning to using the renovated Coursework as the primary web resource of CS145. A demo of coursework is here (login as a student). As part of the transition, we are porting all of the information from this website to Coursework. In the meantime, if there is something you can't find on this website, check Coursework, and vice-versa. Optional discussions will also be on Coursework, not on the newsgroup. Gradiance assignments will still be on Gradiance, not Coursework.

Coursework

Coursework demo

**************************************************************************

Course Information

  1. There will be a review session on Mondays, 3:15PM in McCullough 115. It will be broadcast for TV students on Channel E1. Note: we had another notion of when these sessions would be held, so please ignore any previous messages.
  2. Be sure to read the Course Introduction (HTML). Note that this is a ``living document''; it will change as new information about the course is known. Office hours are also listed there.
  3. There is a new text for the course that will not be available until Sept. 28. However, you can see the first two chapters: Ch. 1 Ch. 2. Additional complications arise because some students may wish to buy a single text for both this course and CS245. Please see The Course Introduction for the details.

Outline, Schedule, and Readings

The readings (for one book or the other) are required, even if material is not covered in the lectures. All other readings are optional, interesting supplements, and may not match the course content exactly.
DateTopicRequired Reading (FCDB/3)Required Reading (FCDB/2 or DSCB)Other Useful Readings
9/24Intro to DBMS's, Relational Model, SQL Data Definition, XML 1, 2.1--2.31, 3.1, 6.6.1--6.6.4Greenspun's SQL for Web Nerds Intro, SQL/Nerds Modeling (parts), Widom Notes: Introduction, Widom Notes: Relations, XML
9/26Relational Algebra 2.4, 5.15.2, 5.3 Widom Notes: Relational Algebra
10/1Introduction to SQL 6.1--6.36.1--6.3SQL/Nerds Queries, Widom Notes: SQL
10/3Advanced Relational Algebra and SQL 5.2, 6.4, 6.55.4, 6.4, 6.5SQL/Nerds Advanced Queries
10/8Constraints and Triggers 77or-triggers.html, SQL/Nerds Triggers, Widom Notes: Constraints and Triggers
10/10SQL Transactions, Views, and Indexes 6.6, 88.6, 6.7, 6.6.5, 6.6.6, Appendix CSQL/Nerds Views, Widom Notes: Transactions, Widom Notes: Views, Widom Notes: Indexes
10/15Embedded SQL, PSM, PL/SQL 9.3, 9.48.1, 8.2 or-plsql.html
10/17JDBC, PHP, CLI 9.1, 9.2, 9.5--9.78.3--8.5, Appendix D or-jdbc.html
10/22Semistructured Data, XML, DTD's, XML Schema 114.6, 4.7, Appendix E.1W3-Schools Tutorial on XML
10/24XPath, XQuery 12.1, 12.2Appendix E.2, E.3XPath Manual, XQuery Manual, Chamberlin Tutorial on XQuery
10/29More XQuery, XSLT 12.3Appendix E.4XSLT Manual
10/31Midterm in class --Up to 10/24 lecture
11/5Functional Dependencies, Normalization 3.1--3.33.4, 3.5, 3.6.1--3.6.4 Widom Notes: Relational Design
11/7Inference of Dependencies, Multivalued Dependencies, 3NF, 4NF 3.4--3.73.6.5, 3.6.6, Appendix A-
11/12Entity/Relationship Model 4.1--4.62, 3.2, 3.3-
11/14More E/R, UML, ODL 4.7--4.10Appendix B, 4.2--4.4 Widom Notes: UML
11/26Authorization, Datalog, Recursive SQL 10.1, 5.3, 5.4, 10.28.7, 10 Widom Notes: Authorization, Widom Notes: SQL3 Recursion
11/28Object-Relational SQL 10.3--10.59.4, 9.5 or-objects.html, Widom Notes: Object-Relational SQL
12/3OLAP, Data Cubes, Warehousing 10.6, 10.720.4, 20.5 Widom Notes: Data Warehousing and Mining
12/5Project Demos, Review ---

Resources

  1. You can get handouts and exams from previous years through the web page of the textbook A First Course in Database Systems. For the latest information on errata, go to The Errata Sheet for DSCB and FCDB/2 or The Errata Sheet for FCDB/3.

  2. If you haven't taken CS103 and are unsure whether you have the material, you may look at Class Notes for CS109 (109 was the old number for what is now 103).

  3. SQL For Web Nerds is an amusing explication of SQL. You may wish to read several of the sections as we cover SQL in class.

  4. There are tutorials about "X-stuff" (XML, XQuery, etc.) at W3 Schools.

  5. For information about how to use the Stanford Oracle system, and to do things in Oracle generally, go to The Text's Oracle Guide. Note: Oracle gives mysterious error numbers when you do something wrong. Using the error-messaage number as a Google query often gives you an answer from some newsgroup that has discussed the problem.

  6. To remotely login to a Leland server, you need SecureCRT. To transfer files between your local space and your Leland space, you need SecureFX. Information and downloads for both can be found here.

  7. Prof. Widom's CS145 Notes from 2006. While we shall not deviate too much from last year's course, the emphasis is often somewhat different, and always interesting.

Assignments - see CourseWork for the latest to-do list.

  1. Project Part 1: AuctionBase Schema and Data, due Wednesday 10/31/07 11:59PM. See Coursework --> assignments. FAQ. Help session files.
  2. Project Part 2: Oracle Features, due Friday 11/9/07 11:59PM. See Coursework --> assignments. FAQ. Help session slides. Trigger Example.

Past Assignments

  1. Gradiance Assignment on Relational Algebra, due Monday 10/8/07 11:59PM. 
  2. Challenge Problems #1 on relational model/algebra, due Monday 10/8/07 11:59PM. See Coursework --> assignments. FAQ.
  3. Gradiance Assignment Basic SQL, due Wednesday 10/10/07 11:59PM.
  4. Gradiance SQL Lab (Kings) due Wednesday 10/10/07 11:59PM. Note: You find this work under "Labs." It requires you to write some SQL queries and tells you whether or not you are right. If not right, it shows you an example database where your query does the wrong thing. Note: if you write a query that works only on the examples, the system catches it and --- well try it and you'll see :-). 
  5. Gradiance Assignment on Advanced SQL, due Wednesday 10/17/07 11:59PM.
  6. Gradiance SQL Lab (Battleships), due Wednesday 10/17/07 11:59PM. Note: you should be aware of the fact that Gradiance runs queries using the mySQL database, and that there some nonstandard features of mySQL, including some bizarre behaviors of ANY and ALL. See the online mySQL guide.
  7. Project Part 0: Oracle warm-up, due Wednesday 10/17/07 11:59PM. See Coursework --> assignments.
  8. Gradiance Assignment on Constraints, Triggers, Transactions, and Views, due Wednesday 10/24/07 11:59PM.
  9. Challenge Problems #2 on transactions/SQL, due Wednesday 10/24/07 11:59PM. See Coursework --> assignments. FAQ.

    Lecture Notes

    DatePPTPDF
    9/24 Database Models Database Models
    9/26 Relational Algebra Relational Algebra
    10/1 SQL Introduction SQL Introduction
    10/3 More Rel. Alg. + SQL More Rel. Alg. + SQL
    10/8 Constraints and Triggers Constraints and Triggers
    10/10 Transactions, Views, Indexes Transactions, Views, Indexes
    10/15 Embedded SQL, PSM, PL/SQL Embedded SQL, PSM, PL/SQL
    10/17 CLI, JDBC, PHP CLI, JDBC, PHP
    10/22 DTD's, XML Schema DTD's, XML Schema
    10/24, 29 XPath, XQuery, XSLT XPath, XQuery, XSLT
    11/5 Design Theory for Relations (Ullman) Design Theory for Relations (Ullman)
    11/5 Design Theory for Relations (Yang) Design Theory for Relations (Yang)
    11/7 MVD's, 4NF, Inference MVD's, 4NF, Inference
    11/12 Entity/Relationship Model Entity/Relationship Model
    11/14 UML, ODL UML, ODL
    11/26 Authorization Authorization
    11/26-28 Datalog, Recursive SQL Datalog, Recursive SQL
    11/28-12/3 Object-Relational SQL Object-Relational SQL
    12/3 Information Integration Information Integration
    12/5 OLAP, Data Mining OLAP, Data Mining

        Problem Session Notes

DatePPTPDF
10/1 Products and Joins Products and Joins
10/8 SQL exercises SQL exercises
10/22 Project 1 Help Project 1 Help
10/29 MT Review Slides MT Review Slides
10/29 MT Review Work (.xls) MT Review Work
11/29 E/R, UML, ODL exercise E/R, UML, ODL exercise