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

Draw a flowchart to input start time and end time of vehicle, Speed cameras...

Speed cameras read the time a vehicle passes a point (A) on road and then reads time it passes a second point (B) on the same road (points A and B are 100 metres apart). Speed of t

Insertion sort, Data array A has data series from 1,000,000 to 1 with step ...

Data array A has data series from 1,000,000 to 1 with step size 1, which is in perfect decreasing order. Data array B has data series from 1 to 1,000,000, which is in random order.

Explain np-complete decision problem, a. Determine the result of inserting ...

a. Determine the result of inserting the keys 4,19, 17, 11, 3, 12, 8, 20, 22, 23, 13, 18, 14, 16, 1, 2, 24, 25, 26, 5 in order to an empty B-Tree of degree 3. Only draw the configu

Write an algorithm inputs speed of cars using pseudocode, Write an algorith...

Write an algorithm by using pseudocode which: Inputs top speeds of 5000 cars Outputs fastest speed and the slowest speed Outputs average speed of all the 5000 cars

Illumination of wire frame, Illumination of wire frame The colour or sh...

Illumination of wire frame The colour or shade that a surface appears to the human eye depends primarily on three  factors : Colour and strength of incoming illumination

What are the specific needs for realism, Normal 0 false false...

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

Estimate best first search nodes , Given the following search tree, state t...

Given the following search tree, state the order in which the nodes will be searched for breadth first, depth first, hill climbing and best first search, until a solution is reache

Algorithm for insertion into the circular queue, Algorithm for insertion of...

Algorithm for insertion of any element into the circular queue: Step-1: If "rear" of the queue is pointing at the last position then go to step-2 or else Step-3 Step-2: make

Explain about the string abstract data type operations, Explain about the S...

Explain about the String Abstract data type operations Symbol ADT has no concatenation operations, but presuming we have a full-featured String ADT, symbols can be concatenated

Multiplication, Implement multiple stacks in a single dimensional array. Wr...

Implement multiple stacks in a single dimensional array. Write algorithms for various stack operations for them.

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