Home TechnologySoftware Subscribe to RSS

Describe Direct Access Methods To Access Information In A File?

Access Methods

Answer Question

1 Answer - Sort by: Date | Rating

    Direct access is based on a disk model of a file. For direct access, the file is viewed as a numbered sequence of block or records. A direct-access file permits random blocks to be read or written. After block 18 has been read, block 57 could be next and then block 3. There are no restrictions on the order of reading and writing for a direct access file. Direct access files are of great use for intermediate access to large amounts of information.
    The file operations must be modified to include the block number as a parameter. It works like "read n", where n is the block number rather than "read next". Similarly, it writes with "write, n" rather that "write next".

    An alternative approach retains "read next" and "write next". It adds an operation "position file to n" where n is the block number. Then we would issue the command "position to n" and then "read next".

    All operating systems maintain sequential as well as direct access for files. Some systems allow only sequential file access. Others allow only direct access. Some systems require that a file should be defined as sequential or direct when it is created. Such a file can be accessed only in a manner defined at the time of its declaration.
    0 0

    Azi  

    answered 3 years ago

      More

         
         

        Ask a Question via Twitter

        Send a question to @askblurtit and we will publish it online and send you a reply everytime you receive an answer.

        Blurtit Store

        Get T-shirts, hoodies, caps and more at the Blurtit store

        Blurtit International