This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Monday 1 May 2017

Concept of Files, Records and Fields



File
  • Files are a kind of container or collection of related records that is  used for storing the Data of the users for a Long time Period.
  • Files can contain any type of information means they can Store the text, any Images or Pictures or any data in any Format.
For example
 (1) a student file might include all of the records of students enrolled at a school.

(2)A police department might keep a file of criminal records, which includes details about all known criminals.
  • ·       Files are stored on secondary storage devices such as hard disks, CD-ROMs etc.

So that there must be Some Mechanism those are used for Storing the information, Accessing the information and also Performing Some Operations on the files

Operation performed on file
Open
  • A file can be opened in one of two modes, Read mode or Write mode. In read mode, operating system does not allow anyone to alter data it is solely for reading purpose
  • The other mode is write mode, in which, data modification is allowed. Files opened in write mode can be read also but cannot be shared.
Locate
Every file has a file pointer, which tells the current position where the data is to be read or written. This pointer can be adjusted accordingly. Using find (seek) operation it can be moved forward or backward.
Retrieval
Retrieval operation is used to access the data from the file.
Read
By default, when files are opened in read mode the file pointer points to the beginning of file. There are options where the user can tell the operating system to where the file pointer to be located at the time of file opening.
Write
User can select to open files in write mode, which enables them to edit the content of file. It can be deletion, insertion or modification.
Update
Update operations change the data values by insertion, deletion or update.
Close
This also is most important operation from operating system point of view. When a request to close a file is generated, the operating system removes all the locks (if in shared mode) and saves the content of data (if altered) to the secondary storage media and release all the buffers and file handlers associated with the file.
                        Read file organisation and their Techniques CLICK HERE
                        Read Master And Transaction File and More CLICK HERE

Records / Tuples / Rows

  • Data is stored in records. A record is composed of fields and contains all the data about one particular person, company, or item in a database.
  • A set of records constitutes a file. Record is also known as Tuple or Row.


Collection of related records=Files

In this database, a record contains the data of Students. Records appear as rows in the database table. There are 4 records of 4 different students given below:


Fields/ Column/Attribute


  • A table consists of several records(row), each record can be broken into several smaller entities known as Fields.
  • A field is part of a record and contains a single piece of data for the subject of the record. It may also be known as Column or Attribute.

Collection of related Fields=Records
  • The above Student table consist of four Fields Roll_No, Student_Name, Course, Adhaar_No.



Types of Fields

                 On the basis of length or size fields can be categorized into two category i.e

Fixed Length Field

  • Fields that contain a fixed number of bits are known as fixed length fields. A four byte field for example may contain a 31 bit binary integer plus a sign bit (32 bits in all).
  • The disadvantage of using fixed length fields is that some part of the field may be wasted when data size is smaller than field size.
  • More space is still required for the maximum length case.

Variable Length Field


variable length field is not always the same physical size. Such fields are nearly always used for text fields that can be large, or fields that vary greatly in length.