Home >>DBMS Tutorial >DBMS File Structure
Relative knowledge and data is collectively stored in file formats. A file is a record sequence that is stored in binary format. A disk drive that can store records is formatted into several blocks. On such disk blocks, file records are mapped.
File Organization determines how records of files are mapped to blocks of disks. To organize file records, we have four types of file Organization:
When a file is created using Heap File Organization, without any specific accounting details, the Operating System allocates the memory area to that file. Anywhere in that memory area, file records can be placed. The software is responsible for managing the records. Any ordering, sequencing or indexing on its own is not supported by Heap File.
Every record of a file contains a data field (attribute) to define the record uniquely. Records are put in the file in a sequential order in the sequential file organization, based on the specific key field or search key. Practically, it is not possible to store all records in physical form sequentially.
The Hash File Organization uses certain fields of the records to compute the Hash function. The hash function output specifies the location of the disk block where the records should be stored.
The organization of clustered data is not considered good for large databases. Linked records from one or more relations are kept in the same disk block in this mechanism , i.e., record ordering is not based on a primary key or search key.
Database file operations can be divided broadly into two categories:
Update operations alter the values of data by inserting , deleting, or updating them. On the other hand, retrieval operations do not change the data, but retrieve it after optional conditional filtering. Selection plays a major role in all kinds of operations. There may be other operations, other than creating and deleting a file, that can be performed on files.