.

Saturday, February 9, 2019

Relative File Organization :: Free Essay Writer

Relative File OrganizationThis topic discusses different types of indexing techniques that allows the reparation of records in a file relatively fast with fewer accesses. The techniques that get out 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 consecutive or in a contiguous manner. By utilise ingest addressing, a predictable relationship between a discern of a record and the location of that record on an external file is established. cardinal different forms of addressing can be used to establish this relationship 1. compulsory Addressing 2.Relative Addressing Absolute addressing make use of the storage devices to determine the relationship, and therefore it is machine dependent, e.g., cylinder- outcome, surface- turning, and record-number if we are using cylinder addressing or sector-number and record-number if sector addressing is being used.HashingHashing is the application of a live to the key value of a record that results in mathematical function the go of possible key value into a smaller range of relative addresses. For example, if a company is to maintain data of 10,000 employees by using the employees social security number, which ranges from 1 to 999999999, into 10,000 relative positions. The hash function to be applied to the social security number must be able to match severally 10,000 social security number into each relative address available. However, collisions do occur. Collisions occurs when two different keys, in this issue two social security numbers, hash into the same relative address. These two different keys aretermed synonyms.The relationship between the file space and the number of keys is described as the load factor. Load factor is the ratio of the number of key values to be stored versus the number of file positionsLoad promoter = number of key values / number of file positionsPrime-Number Division etern al sleepPrime number division remainder method works on the nose like using the mod operator in Pascal or the % operator in C or C++. The key to a record is divided with a prime-number and the remainder from the division is used as the relative address for that record.Digit ExtractionThis method analyzes the key values to determine which physical body positions in the key are more as 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 ordinal digit positions has been extracted.

No comments:

Post a Comment