Concepts, File Organization,

File

Edit

Files and their types

Edit

Q     What are different file types and how to access it ?         -- May 2017 – 6 m

Ans :      Files are used to store information on various storage media such as magnetic disks.

                Types of files

a) Regular Files :- Regular files are either  ; ASCII files or binary files ; ASCII Files are also known as text files.
b) Directories : - Directories are system files for maintaining the structure of the file system. In windows they are also called, as folders
c) Character Special File :- These are system files. They are related to Input / Output and used to model serial I / O devices such as terminals, printers and networks.
d) Block special Files :- This files are used to model disks.

Access methods ( File Organization )

Edit

  A file is a collection of records where each record consists of one or more fields. File organization can be defined as the method of storing data records in a file

File Organization

a) Pile- It is simplest form of organization. Data are stored in the order they arrive.

Pile

b) Sequential File :- In this type of File

                1) A fixed format is used for record.

                2) All records are of the same length.

c) Indexed File :- Indexing is used to speed up retrieval of records. Each record in indexed file,   consists of two fields, a key field and pointer into the main file.

d) Indexed Sequential File :- It is combination of both sequential file and indexed file.

e) Direct or Hashed  File :- It is a common technique used for fast accessing of records on secondary storage. Records of a file are divided among buckets.

File Operations

Edit

Q       List the different file operations.                                              ---    4 m

Ans :-    Different systems allow different operations on a file. Common operations on a file

  1. Creating a file
  2. Opening a file
  3. Reading a file
  4. Writing a file
  5. Closing a file
  6. Appending data to a file
  7. Renaming a file
  8. Setting attributes of a file

File Structures

Edit

# File Structures :-

Q     Write short note on : file structures  ( 4 m)

Ans :      There are three common file structures

a) Byte sequence
It is an unstructured sequence of bytes. The operating system does not impose any structure on the file.

Byte sequence

The advantage of this scheme is that there is a maximum flexibility for user, but the disadvantage is that there is no support from operating system side.

b) Record sequence - It is a sequence of fixed size records. Arbitrary records can be read or written but records cannot be inserted or deleted in the middle of a file.

 Record sequence

c) Tree - It is tree of disk blocks. Each block holds a  number of keyed records. Records can be searched by key value and new records can be inserted anywhere in the file structure.

 Tree

References

Edit
  • WikiNote Foundation

Last modified: Friday, 20 September 2019, 3:18 PM