Organisation of record in a file

1) Ordered file Organization: All file of record are ordered based on some search key value.For searching we use binary search

B1,B2,B3....................Bn

To access a record ,the avg no of block access =log2B blocks

Advantages: Searching is efficent

Disadvantage: Insertion is expensive due to re organization of the entire file.

 

2) Unordered file Organization: All file of records are inserted at where ever the place is available useually at the end of thr file.Linear search is used for searching.

To access a record the average no of block access =B/2 block

 

Advantage: Insertion is efficent

Disadvantage: Searching is inefficent compared to ordered file organisation.

Contributor's Info

Created:
0Comment
File Organisation-1

Data base is a collection of files,each files is a collection of records,each record is a sequence of fields.

Blocking factor:

blocking factor is the avg no of records per block.

 

There are some strategies for storing file of record into block and they are as follows:

1)Spanned Strategy:

It allows partial part of record that can be stored in a block.It is suitable for variable length record.

some time we try to fatch the web page and put them as a record in a database and every webpage may have different sizes in that cas we use spanned stratergy.

Advantages: No wastage of memory

Disadvantage:Block access increases

 

2)UnSpanned Straregy:

no record can be stored in more than 1 block.It is suitable for fixed  length record.

If company record has eemploee data base that are fixed size ,in such case we go for un spanning.

Advantage: block access reduced

Disadvantage: wastage of memory

 

 

 

Contributor's Info

Created:
0Comment