Spring 2002
| Class Hours: | SAGE 3510, TF 10:00-11:50am |
| Instructor: | Mohammed J. Zaki |
| Office: | Lally 307 |
| Phone: | x6340 |
| Email: | zaki.AT.cs.rpi.edu |
| Instructor Office Hours: | Tuesdays 12-2pm, or by appointment |
| TA Office Hours: | |
| Matt Freeman (freemm@rpi.edu) | Mondays 12-2pm, Lally 8, x6959 |
| Feng Gao (gaof@rpi.edu) | Wednesdays 2-4pm, Lally 4, x2135 |
| Zujun Shentu (shentu@rpi.edu) | Thursdays 12-2pm, Lally 3A, x8556 |
| Web Page: | http://www.cs.rpi.edu/~zaki/cs4380/ |
Here is the solution for HW4
HW4 (Postscript Format)
HW4 (PDF Format)
Here are some clarifications of the answers:
in Q11.17, the solution uses 40 as the base of the log. For this they
made a best case assumption that all index pages are full. The correct
number to use is 20 since a BTree guarantees half filled index
pages.
in Q13.8, there should be 40,000 tuples of R and not 20,000 as used
in the answers.
in Q 13.10, the answer ignores the cost of the first pass to create
F/M runs. For relation R, F=1000 and M =10. The exact cost for
external sort should be: 2F + 2F ceil (log_M-1 (F/M))
= 2x1000 + 2x1000 ceil (log9(1000/10))
= 2x1000 (1 + ceil(2.09))
= 2000 (1 + 3) = 8000 pages.
The same should be done for S.
Q13.12, the answer for part 3, using index on A is incorrect. Since we are using a BTree to search for a value other than A=22, it would take us 4 I/Os to get to the start of the file, and then it is best to do a scan in order. So the total cost will be 4+cost of scan = 4 + 100,000 = 100,004.
Note that you may use either the PC labs or the RCS unix machines
to do the embedded SQL studio. See the oracle
page on more details and instructions for both PCs and RCS unix
machies.
I also have the oracle client software CD if you want to install it on
your laptop. If you want to intall it come see me after 1:30pm on
Friday (8th March) or after the spring break.
| TUESDAYS | FRIDAYS |
| Jan 15 - Overview I | Jan 18 - Overview II |
| Jan 22 - Relational Model | Jan 25 - Entity-Relationship Model |
| Jan 29 - Relational Algebra | Feb 1 - SQL |
| Feb 5 - SQL | Feb 8 - TRC |
| Feb 12 - Functional Dependencies | Feb 15 - Functional Dependencies |
| Feb 19 - NO CLASS (monday schedule) | Feb 22 - EXAM I |
| Feb 26 - Normalization | Mar 1 - Embedded SQL |
| Mar 5 - Physical Organization | Mar 8 - Indexing |
| Mar 12 - SPRING BREAK | Mar 15 - SPRING BREAK |
| Mar 19 - Indexing | Mar 22 - Indexing |
| Mar 26 - Query Processing | Mar 29 - Query Processing |
| Apr 2 - Query Optimization | Apr 5 - Exam Review |
| Apr 9 - EXAM II | Apr 12 - Query Optimization |
| Apr 16 - Exam Solutions | Apr 19 - Transaction Processing |
| Apr 23 - Transaction Processing | Apr 26 - Triggers |
| Apr 30 - Final Exam Review | May 3 - FINAL PROJECT DUE |