Chapter 13: Problem 34
Suppose that we have a hash file of fixed-length records, and suppose that overflow is handled by chaining. Outline algorithms for insertion, deletion, and modification of a file record. State any assumptions you make.
Chapter 13: Problem 34
Suppose that we have a hash file of fixed-length records, and suppose that overflow is handled by chaining. Outline algorithms for insertion, deletion, and modification of a file record. State any assumptions you make.
All the tools & learning materials you need for study success - in one app.
Get started for freeLoad the records of Exercise 13.27 into an expandable hash file, using linear hash. ing. Start with a single disk block, using the hash function \(h_{0}=K \bmod 2^{0},\) and show how the file grows and how the hash functions change as the records are inserted. Assume that blocks are split whenever an overflow occurs, and show the value of \(n\) at each stage.
Can you think of techniques other than chaining to handle bucket overflow in external hashing?
Can you think of techniques other than an unordered overflow file that can be used to make insertions in an ordered file more efficient?
Suppose we want to create a linear hash file with a file load factor of 0.7 and a block. ing factor of 20 records per bucket, which is to contain 112,000 records initially. a. How many buckets should we allocate in the primary area? b. What should be the number of bits used for bucket addresses?
Write program code to access individual fields of records under each of the following circumstances. For each case, state the assumptions you make concerning pointers, separator characters, and so forth. Determine the type of information needed in the file header in order for your code to be general in each case. a. Fixed-length records with unspanned blocking. b. Fixed-length records with spanned blocking. c. Variable-length records with variable-length fields and spanned blocking. d. Variable-length records with repeating groups and spanned blocking. e. Variable-length records with optional fields and spanned blocking. f. Variable-length records that allow all three cases in parts \(c, d,\) and e.
What do you think about this solution?
We value your feedback to improve our textbook solutions.