• 沒有找到結果。

Database Systems Assignment 5: Hash-based Indexing & Query Evaluation Overview

N/A
N/A
Protected

Academic year: 2021

Share "Database Systems Assignment 5: Hash-based Indexing & Query Evaluation Overview"

Copied!
1
0
0

加載中.... (立即查看全文)

全文

(1)

Database Systems

Instructor: Hao-Hua Chu Fall Semester, 2005 Assignment 5: Hash-based Indexing & Query Evaluation Overview

Deadline: At the end of the class, Dec 19 (Monday), 2005

This is an individual assignment, that is, no group submissions are allowed. Cheating Policy: If you are caught cheating, your grade is 0.

Late Policy: You may hand in your late assignment at TA’s office hour on Tue (12/20/2005) for 80% of original grade, or at TA’s office hour on Wed (12/21/2005) for 70%. We will not accept any assignment submissions after Wed.

Questions

1. Suppose that we are building an extendible hashing index. At the beginning, directory is array of size 2 as shown below. A bucket can hold 3 records.

a. Show the extendible hash structure after inserting the following search-key values:

2, 3, 5, 7, 11, 17, 19, 23, 29, 31

b. Show how the extendible hash structure of (a.) changes after the following steps:

Delete 31, Delete 7, Insert 12, Delete 23

2. What are the advantages and disadvantages of hash index relative to B+-tree index? How might the type of index available influence the choice of a query processing strategy?

3. Suppose that a B+-tree index on branch-city is available on relation branch, and that no other index is available. List different ways to handle the following selections that involve negation:

a. σ¬ (branch-city<“Brooklyn”)(branch) b. σ¬ (branch-city=“Brooklyn”)(branch)

c. σ¬ (branch-city<“Brooklyn” OR assets<5000)(branch)

4. Let relations r1(A,B,C) and r2(C,D,E) have the following properties: r1 has 20,000 tuples, r2 has 45,000 tuples, 25 tuples of r1 fit on one page, and 30 tuples of r2 fit on one page. The buffer size is 101 pages.

Estimate the LEAST number of page accesses required and explain in detail how you obtain it, using each of the following join strategies:

a. Index Nested Loop

(We have both unclustered hash index <C> in r1 and <C> in r2. NO overflow occurs.) b. Sort-Merge

(r1 and r2 are NOT initially sorted on the join key.)

Submission

Hand in PAPER PRINTOUT that contains your answers to the three questions. Please include your name and ID.

參考文獻

相關文件

A Very good. You are able to apply your understanding of how endogenetic processes leading to the formation of major landform features along plate boundaries to explain the

A) the approximate atomic number of each kind of atom in a molecule B) the approximate number of protons in a molecule. C) the actual number of chemical bonds in a molecule D)

You are given the wavelength and total energy of a light pulse and asked to find the number of photons it

1.5 In addition, EMB organised a total of 58 forums and briefings (45 on COS and 13 on special education) to explain the proposals in detail and to collect feedback from

If w e sell you land, you m ust rem em ber that it is sacred, and you m ust teach your children that it is sacred and that each ghostly reflection in the clear w ater of the lakes tells

Wang, Solving pseudomonotone variational inequalities and pseudocon- vex optimization problems using the projection neural network, IEEE Transactions on Neural Networks 17

Then, a visualization is proposed to explain how the convergent behaviors are influenced by two descent directions in merit function approach.. Based on the geometric properties

With the aid of a supply - demand diagram, explain how the introduction of an effective minimum wage law would affect the wage and the quantity of workers employed in that