File Organization in Database [SQL Server]

File Organization In Database[COMPLETE CONCEPT]

Database SQL Server

FILE ORGANIZATION:

           Storage and access method of a file is called file organization.

TYPES OF FILE ORGANIZATION:

1.Sequential File Organization
2.Direct access File Organization

SEQUENTIAL FILE ORGANIZATION:

When we have to access data in sequence.
Example:
Tape-drive. In tape drive if we want to access the 2nd video we have to go through the 1st then we can access the second one . We can’t jump directly to  2nd .
ADVANTAGE OF SEQUENTIAL FILE ORGANIZATION:
Sequential saves memory. Because there is no meta data (header/footer) with a single record.

USES OF SEQUENTIAL FILE ORGANIZATION:
Sequential file organization is helpful when we have to access the whole batch . i.e Electricity bills.

DRAWBACKS OF SEQUENTIAL FILE ORGANIZATION:
1.Time loss
2.Searching is difficult in Sequential file Organization
3.If we try to insert a new data we have to reorganize the whole data.
4.If we are searching a data which is not present in the records. It will search the whole data then tell that the data is not present.

DIRECT FILE ORGANIZATION:

Example:


Hard Drive.

ADVANTAGES OF DIRECT FILE ORGANIZATION:

1.Time saving
2.Searching is easy in Direct file Organization

TYPES OF DIRECT FILE ORGANIZATION:

1.Indexed Sequential
2.Hashing


INDEXED SEQUENTIAL:
           
Indexed Sequential is same as Table of Content in books.
HASHING:
   Hashing is a function but not a specific function. We can made our hashing function.

TYPES OF HASHING FUNCTION:

1.Division method
2.Folding method

DIVISION FUNCTION:

x mod y return remainder. If remainder of two numbers are same then it is called hashing conflict.

SOLUTION OF HASHING CONFLICT:

Add 1 to the remainder.

FOLDING METHOD:

You can fold a number to find that in which track the given record should go.

FOR EXAMPLE:

Suppose a record with Student ID 8530 & you have to use folding method to tell that  which hard drive’s track will hold this record ?

  8      5        3       0

            8       5
      +    3      0
      --------------
           11     5   <------- This record will save in 5th 
     ---------------
track in hard drive!

THANK YOU... 🙂

Post a Comment

6 Comments

  1. If you are new to the site, I advise you to consult professionals who will make you a site or allow you to choose a template for your site in the category go here responsive website templates

    ReplyDelete
  2. Thankfulness to my dad who informed me relating to this blog, this website is really amazing.
    Media Onlines

    ReplyDelete
  3. And that when implementing structured data, on your website, you shouldn’t use Google Tag Manager.
    xenforo bot

    ReplyDelete
  4. Well, it’s a nice one, I have been looking for. Thanks for sharing such informative stuff.
    Forever69

    ReplyDelete
  5. Awesome work! That is quite appreciated. I hope you’ll get more success.
    Canada Sex Toys

    ReplyDelete
  6. Thanks for compiling such nicest information in your blogs. Articles are very informative and hope again I’ll find more like that.
    bulk url opener extension

    ReplyDelete