DB Inc. Memo ID: R04 Name of R&D group: KKS

advertisement

DB Inc.

Memo ID: R04

Name of R&D group: KKS

Attended members: Ki-Hwan Kim, Dong-Shin Kim, Dong-Man Shin

Unattended members:

Name of the person to prepare the memo: Dong-Man Shin

Summary

Index structure(continue)

We decided on using linear hashing index.

1. The size of one page is 2048byte.

2. each hash record size is 12byte since hash key value is integer(4byte), page address is integer(4byte) and slot number is integer(4byte)

3. the directory of each page consists of previous page address, next page address and empty check fields.

H_key P_num S_num

12byte

Next_add prev_add

Empty check field

4. Total number of record in one page is 127 since

127 records * 12 byte = 1524 byte

127 check_field * 4byte = 508 byte

1 block_field * 4byte = 4 byte num_slot field * 4byte = 4 byte prev_add field * 4byte = 4 byte next_add field * 4byte = 4 byte

-------------------------------------------- total 2048 byte

5. For better performance, we will use page structure format. If we use page structure whose size is 2048byte, we can read and write one page at one I/O.

6. we can use 7bit for hash function so, total distinct number of bucket is 128(2^7) without null bucket and total number of record will be around 16256(128 burcket

* 127 record per page). Each bucket allows over flow bucket so total number of record will be grater than 16256.

7. First page is header page which consist of hash table, global depth , number of record and number of bucket

8. Instead of writing hash table, global depth, number of record whenever these

9. values are changed, we will use array and global value and write these values at one time for performance.

Download