1 CSE 444 final review Some possible topics Database tuning B+ trees Index selection Query execution and optimization Relational algebra Physical query operators Estimating statistics Selecting logical and physical plans Parallel databases Parallel, distributed query operators MapReduce Pig Latin Note: this is not a complete list of topics Other recommended problems to review Fall 2009 Final Problem 2 Fall 2009 Final Problem 3 * and many more available in previous exams * http://www.cs.washington.edu/education/courses/cse444/11wi/exams/index.html2 Map Reduce Example Recall the following pseudo code for counting words in a document. map(String key, String value): // key: document name // value: document contents for each word w in value: Emit Intermediate(w, “1”): reduce(String key, Iterator values): // key: a word // values: a list of counts int result = 0; for each v in values: result += ParseInt(v); Emit(AsString(result)); Working with R(A, B) S(C,D), implement the following in Map Reduce pseudo code: a) Select * from R where B<9 [selection] b) Select distinct A from R [duplicate elimination] c) Select * from R, S where R.A = S.C [join]3 Cost of query execution example45 Final Autumn 201067
View Full Document