Write a program to create a hashed file, Data Structure & Algorithms

Assignment Help:

Write a program to create a hashed file that stores the records currently in the file "data_2013". Records should use the same fixed-length schema given previously, and should again be written in binary.

When inserting the records into your new file, they should be hashed on the ID attribute.

Using a static hashing approach, with the hash functionID % pageswhere pages is the number of pages in the file) to determine which "page" of the file the recordsshould be stored in. For simplicity (so that you do not need to worry about the possibility ofoverflow records), assume an average occupany of 80%. (Hint: as a first step, your programshould calculate the total number of pages that there will be in your file, based on the numberof records to be stored, the occupancy, and the pagesize parameter.) You should implement this hashing algorithm yourself.


Related Discussions:- Write a program to create a hashed file

Methods, what is folding method?

what is folding method?

Explain about hubs, Hubs - In reality a multiport repeater - Connect...

Hubs - In reality a multiport repeater - Connects stations in a physical star topology - As well may create multiple levels of hierarchy to remove length limitation of 10

Example of binary search, Let us assume a file of 5 records that means n = ...

Let us assume a file of 5 records that means n = 5 And k is a sorted array of keys of those 5 records. Let key = 55, low = 0, high = 4 Iteration 1: mid = (0+4)/2 = 2

C++ function, Write c++ function to traverse the threaded binary tree in in...

Write c++ function to traverse the threaded binary tree in inorder traversal

Program insertion of a node into any circular linked list, Program Insertio...

Program Insertion of a node into any Circular Linked List Figure depicts a Circular linked list from which an element was deleted. ALGORITHM (Deletion of an element from a

#, write an algorithm to search a particular node in linked list which retu...

write an algorithm to search a particular node in linked list which returns " FOUND" or "NOT FOUND" as outcome.

Merge sort, #question. merging 4 sorted files containing 50,10,25,15 record...

#question. merging 4 sorted files containing 50,10,25,15 records will take time?

Sorting, explain quick sort algorithm

explain quick sort algorithm

Merge sort, Merge sort is a sorting algorithm which uses the basic idea of ...

Merge sort is a sorting algorithm which uses the basic idea of divide and conquers. This algorithm initially divides the array into two halves, sorts them separately and then merge

Lists, In the earlier unit, we have discussed about the arrays. Arrays are ...

In the earlier unit, we have discussed about the arrays. Arrays are data structures of fixed size. Insertion & deletion involves reshuffling of array elements. Thus, arraymanipulat

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd