1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30...
-
Upload
jack-baker -
Category
Documents
-
view
220 -
download
0
Transcript of 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30...
![Page 1: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/1.jpg)
1
Final Review
Tuesday, March 6, 2007
![Page 2: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/2.jpg)
2
The Final
• Date: Tuesday, March 13, 2007
• Time: 6:30 - 8:30
• Room: EE 037
• You must come to campus
• Open book exam :)
• No computers :(
![Page 3: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/3.jpg)
3
Problem 1: Queries
• SQL
• XPath/XQuery
![Page 4: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/4.jpg)
4
SQL
• Select-from-where
• Subqueries
• Aggregation
• Nulls
• Outer joins
• Database modifications (insert/delete)
A tricky query: for each product, find total sales in November
![Page 5: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/5.jpg)
5
XPath/XQuery
• Xpath: simple navigation /, //, *, […]
• Xquery: nest/unnest/renest/aggregates
A tricky query: eliminate duplicates in a collection of elements
![Page 6: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/6.jpg)
6
Problem 2: Data Modeling
• E/R diagrams
• Functional dependencies and normal forms
• XML and semistructured data
![Page 7: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/7.jpg)
7
E/R Diagrams
• Relationships
• Inheritance
• Weak entity sets
• Mapping to relations
• SQL DDL:– Creating tables– Constraints
A tricky question: map a complex inheritance graph to relations
![Page 8: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/8.jpg)
8
Functional Dependencies
• Basic definitions
• Computing the closure X+
• Computing the keys
• Checking if a relation is in BCNF
• Decomposing into BCNF
Tricky questions: find FD’s in a view; give counterexamples to FDs
![Page 9: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/9.jpg)
9
XML
• XML syntax
• DTD
• From relations to XML
• From XML to relations
A tricky question: N/A
![Page 10: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/10.jpg)
10
Problem 3: Transactions
• Recovery
• Concurrency control
![Page 11: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/11.jpg)
11
Recovery
• Undo log
• Redo log
• Undo/redo log
A tricky question: place a missing END-CHECKPOINT
![Page 12: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/12.jpg)
12
Concurrency control
• Serializability and conflict serializability
• Locks
• Timestamps
• Validation
A tricky question: tell what happens in a schedule
![Page 13: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/13.jpg)
13
Problem 4: Query Processing Engine
• Storage of database elements
• Indexes
• Logical algebra
• Physical algebra
• Optimizations
• Size/cost estimation
![Page 14: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/14.jpg)
14
Storage of Database Elements
• Storing records in blocks
• Storing attributes in records
A tricky question: N/A
![Page 15: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/15.jpg)
15
Index Structures
• Types of indexes:– Dense/sparse index– Primary/secondary index
• B+-trees
• Hash tables:– Extensible hash tables
A tricky question: perform insert/delete in a B+ tree or hash table
![Page 16: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/16.jpg)
16
Logical Algebra
• Operators– Some interesting ones: natural joins, semijoins
• Converting SQL into the algebra
A tricky question: SQL with NOT EXISTS to RA
![Page 17: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/17.jpg)
17
Physical Operators
• One-pass algorithms
• Nested-loop joins
• Two-pass algorithms based on sorting
• Two-pass algorithms based on hash tables
• Index-based algorithms
• Their costA tricky question: N/A
![Page 18: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/18.jpg)
18
Optimizations
• Algebraic laws
• The dynamic programming algorithm
• Pipelining
A tricky question: discuss alternative plans for a query
![Page 19: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/19.jpg)
19
Size/Cost Estimation
• Simple size estimation formulas for selection and join
• Histograms– Eqdepth, eqwidth
A tricky question: N/A
![Page 20: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/20.jpg)
20
General Advice
• Some problems will require thinking– Use judgment
• Problem difficulty may be uneven:– do the easy ones first
![Page 21: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/21.jpg)
21
Grading
–Homework 35%
–Project: 35%
–Final: 30%
![Page 22: 1 Final Review Tuesday, March 6, 2007. 2 The Final Date: Tuesday, March 13, 2007 Time: 6:30 - 8:30 Room: EE 037 You must come to campus Open book exam.](https://reader036.fdocuments.net/reader036/viewer/2022062315/5697bf821a28abf838c85b7f/html5/thumbnails/22.jpg)
22
COMMIT(The End)