This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: ECS 165B: Database System Implementation Lecture 9 UC Davis April 16, 2010 Announcements Several reminders: 1. DavisDB Part 1 due Sunday at 11:59pm 2. Don’t forget about the writeup ( writeup.txt ) when submitting your code 3. Comment your code (but don’t go overboard) 4. Style counts! Keep your code clean, simple, readable . . . 5. Late policy (as per course web page): I 5% penalty per hour late; no credit after 20 hours I But, 48 “free late hours” for entire course We’ll have “code review” meetings next week (stay tuned for email) DavisDB Part 2 (Index Manager) will be handed out Monday; due Sunday, 5/2 at 11:59pm Agenda I Last time  A taste of database theory, Part 1: relational algebra, relational calculus, and firstorder logic I Today  A taste of database theory, Part 2: containment and equivalence of conjunctive queries I Reading: none Recall from last time: relational calculus (RC) I Database query language based on firstorder logic I Syntax: expressions of the form { ( x 1 ,..., x n )  ϕ ( x 1 ,..., x n ) } where ϕ ( x 1 ,..., x n ) is a firstorder formula with free variables x 1 ,..., x n . I Semantics: return all tuples ( a 1 ,..., a n ) such that ϕ ( a 1 ,..., a n ) is true in the database. Example: relational calculus queries Database with three relations: Class (classId, className, roomNo); Student (studentId, studentName); and Takes (studentId, classId). I “Find all students taking a class meeting in Wellman 1” { ( x )  ∃ s ∃ c ∃ n Student ( s , x ) ∧ Takes ( s , c ) ∧ Class ( c , n , ”Wellman 1”) } I “Find all pairs of students not taking a class together” { ( x , y )  ∃ s...
View
Full
Document
This note was uploaded on 04/29/2010 for the course ECS 152 taught by Professor Mr. during the Spring '10 term at University of Great Falls.
 Spring '10
 mr.

Click to edit the document details