File Organization:- 

The process of storing data in a special format is called as file organization. 
 
Types of file organizations:-

1)Sequential File

2)Indexed File

3)Hashed File

1)sequential files :-The records are arranged physically in special order is called as sequential files.

Operations in sequential files :

a)Insertion : The process of inserting or adding record in a file is called as insertion .

b)Deletion : The process of removing records from file is called as deletion



2)Indexed files : Data in file is organized in a special way or format is called as indexed file organization . It allows easy searching of data.

3)Hashed Files : The term hash indicates the splitting of keys into small parts . Attributes or record becomes same as keys .
The idea behind hashing is function h , which is called as hash function or randomizing function .

It has three types : 

i)Internal Hashing : Hashing performed using arays of records by using indexing .

ii)Multiple Hashing : The program applies second or next hash function if first result in a collision .

iii)External Hashing : Hashing performed for disk file is called as external hashing .The address of disk space is divided into small buckets(parts) in which each bucket holds multiple records.


Indexing :

Indexing means assigning special sequence or format to given data. An index of database works same as index of textbook .

Indexes are used when databases are very large. It makes easy searching.

Types of indexes : 

a)Primary index

b)Clustering index

c)secondary index 


A]Primary index : Index which is specified on indexed keys of records in a organized file . Every record has unique value . It has two types as given follow :

1)Dense index : An record appears for every search-key value in file . The record contains sreach key value and pointer to next record with that search key value .

2)Sparse index : Index created for some specific records .

B]Clustering index : Clustering index is always with two fields that are first is same as type of clustering field and second is block pointer .

C]Secondary index : It is standard index sequential file in which only one index is maintained .If we choose to include many indexes on different search keys then index whose search key defines the sequential order of file as a primary key .


-: PREVIOUSE YEAR QUESTIONS ASKED IN UNIVERSITY EXAMS :-

  1. What are logical and physical files.
  2. Explain object and physical files.
  3. Explain basic file operations.
  4. What is file organization ? Explain the sequential file organization.
  5. What do you mean by indexing? explain sparse index.
  6. What is file organization? explain indexed file and dense indexing.