.

Thursday, March 21, 2019

Relative File Organization :: Free Essay Writer

Relative File OrganizationThis progeny discusses different types of indexing techniques that allows the location of records in a file relatively fast with fewer nettlees. The techniques that will be addressed deals with random access file organization only. As this is the best file organization that allows records to be stored randomly rather than sequentially or in a adjoining manner. By using direct addressing, a predictable relationship in the midst of a light upon of a record and the location of that record on an external file is established.Two different forms of addressing can be apply to establish this relationship 1.Absolute Addressing 2.Relative Addressing Absolute addressing make use of the storage devices to coif the relationship, and therefore it is machine dependent, e.g., cylinder- bite, surface- descend, and record-number if we argon using cylinder addressing or sphere-number and record-number if sector addressing is being used.HashingHashing is the applic ation of a function to the key value of a record that results in mapping the range of possible key value into a smaller range of relative addresses. For example, if a company is to champion data of 10,000 employees by using the employees complaisant warrantor number, which ranges from 1 to 999999999, into 10,000 relative positions. The haschisch function to be applied to the social security number must be able to match each 10,000 social security number into each relative address available. However, collisions do occur. Collisions occurs when devil different keys, in this case two social security numbers, hash into the same relative address. These two different keys aretermed synonyms.The relationship amidst the file space and the number of keys is described as the load factor. institutionalize factor is the ratio of the number of key values to be stored versus the number of file positionsLoad Factor = number of key values / number of file positionsPrime-Number Division Remai nderPrime number division quietus method works just like using the mod performer in Pascal or the % operator in C or C++. The key to a record is divided with a prime-number and the rest from the division is used as the relative address for that record.Digit pedigreeThis method analyzes the key values to determine which digit positions in the key are more evenly distributed. The more evenly distributed digit positions are assigned from right to left, and the digit values are extracted and used as the relative address. For example, for a key value 546032178, the relative address could be 8134, from left to right the first, third, fifth, and eighth digit positions has been extracted.

No comments:

Post a Comment