I am quiet new to the theory of database, I am just started to read about it. And now i have got this question that I don’t find an easy answer for in my book (Database systems, a practical approach to design, implementation and managment).
And since I found this site, I am trying my luck here hopefully to get some answers.
I have got this information and questions:
There is this information about a key-transformed (hash-file) file:
-The transformation-key are the field "code" (two digits).
- The domain for this field is two uppercase letters from the english alphabet.
- The maximum number of posts in the file is 30.
- Fixed post-lenght.
- Number of buckets = 17.
- Fill-factor = 60% +- 10%.
- Owerflow are to be placed in the next available space.
a) How many posts must each bucket take?
(are this so simple that I just divide 30 on 17?)
b) What does this mean:
The transformation are based on the ASCII-table, addition and MOD-function?
(is this so simple that I just find the bit-code for the two letters from the ASCII-table for instance A would be 1000001, and if the code is AA I just adds this two values 1000001+1000001 = 10000010 and this is the address to the bucket?)
What would the result be if I reorganize the file to:
- Max number of posts = 50
- Number of buckets = 15 and owerflow-area = 3 buckets
- The rest is the same as above
c) What would the new block (bucket) size be?
Anyone who can give me an easy answer on these questions?
And may be some links to web-pages where I can find some answers to my questions.
Kind regard Stig