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

Arrays, This unit discussed about data structure called Arrays. The easiest...

This unit discussed about data structure called Arrays. The easiest form of array is a one-dimensional array which may be described as a finite ordered set of homogeneous elements

Flowchart, conversion of centrigral to frahenhit

conversion of centrigral to frahenhit

The complexity of searching an element, The complexity of searching an elem...

The complexity of searching an element from a set of n elements using Binary search algorithm is   O(log n)

Algorithm to count number of nodes, Write an algorithm to count number of n...

Write an algorithm to count number of nodes in the circular linked list.                            Ans. Counting No of Nodes in Circular List Let list be a circular h

Stack, Explain the array and linked list implementation of stack

Explain the array and linked list implementation of stack

Define abstract data type & column major ordering for arrays, Q1. Define th...

Q1. Define the following terms: (i) Abstract data type. (ii) Column major ordering for arrays. (iii)  Row major ordering for arrays. Q2. Explain the following: (i) A

Explain the sum of subset problem, a. Explain the sum of subset problem. Ap...

a. Explain the sum of subset problem. Apply backtracking to solve the following instance of sum of subset problem: w= (3, 4, 5, 6} and d = 13. Briefly define the method using a sta

Matrices multiplication, Write an algorithm for multiplication of two spars...

Write an algorithm for multiplication of two sparse matrices using Linked Lists.

Algorithm for sorting a deck of cards, What is wrong with the following alg...

What is wrong with the following algorithm for sorting a deck of cards (considering the basic properties of algorithms)? I. Put the cards together into a pile II. For each ca

Bubble sort, In this sorting algorithm, multiple swapping occurs in one pas...

In this sorting algorithm, multiple swapping occurs in one pass. Smaller elements move or 'bubble' up to the top of the list, so the name given to the algorithm. In this method,

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