File Organization (DBMS)

A file organization refers to the way the files are physically arranged on a storage device. Further, there may be a single key or multiple keys associated with the file. therefore based on its physical storage and the keys used to access records, files are classified as sequential file, relative file, indexed sequential file, inverted file and multi-list file.

The following figure shows the distinction between different files organization based on the number of access keys.

                                                          Multi-key Organization

                                                                          ⇓

                                                                 One Access key

                                                                                ⇓

                                                                     Sequential Access only 

                                                                        ⇙                                  ⇘

                                           Sequential Organization                         Indexed Sequential Organization

                                                                                                ⇓

                                                                                    Direct Access only 

                                                                                             ⇓

                                                                   Relative Organization


Factors that influence the choice of particular file organization for given applications are as follows:

  1. Economy of storage 
  2. Convenience of updates 
  3. Ease of retrieval 
  4. Reliability
  5. Security
  6. Integrity

Sequential File Organization -

The most basic way to organize a collects of records in a file is to use sequential organization. In sequential organized files, the records are written one after the other in order when the file is created 
and can be accessed only in that order in which they are written when the file is used for input figure shows the structure of a sequential file . Note that records are numbered from 0 onwards. Therefore, if there are n records in a file, the first record will be numbered 0 and the last record will be numbered n-1
                                              In some cases, records of a sequential file are sorted by the value of some field in each record. The field (s) whose value is used to sort the records is known as sort key. if a file is sorted by the value of a field named key field. then record i precedes j if and only if file can be sorted on ascending or descending order by a sort key comprised of one or more fields.


 

No comments

Powered by Blogger.