What is file organization / Different file organization techniques / Heap file organization / Sequential file organization / Hash file organization
File organization – physical arrangement of data in a file into records and pages;
arrangement of records in a file when the file is stored in a disk;
Heap file organization (unordered files): (Click to navigate)
- Records are stored in random order (no particular order on any attribute values).
- Records can be stored wherever the space available in a file, that is, a record can be appended at the end of the file or can be inserted in the middle is space available.
- Simplest file organization.
Sequential file organization (ordered files / sorted files): (Click to navigate)
- Records are ordered and stored according to the value of an attribute(s) in a file.
- Records are arranged such that the values of the ordering field are in ascending order.
- It is slightly complex file organization as we need to arrange the data in sorted order for every insert and update operation.
Hash file organization (hashed files) (Click to navigate)
- Records are stored in a file according to a hash function.
- A hash function, say h(value), accepts the value of the attribute(s) and assigns the records to several blocks.
- Very useful file organization if you need a quick access.