Scenario: Solve the problem with the index sequential access method with pros and cons.

You are required to solve the problem with the index sequential access method with pros and cons in the given scenario.


 Scenario:

Suppose we have 999 records of employees Emp1, Emp2, Emp5, Emp6, and so on up to Emp998 and Emp999 stored in a sequence. Hence, records are nothing but a row in the table. In the employee table, we want to insert new records Emp3 and Emp4 in the sequence, and once we have done insertion we need to update and retrieve the record efficiently to optimize the performance of a database by minimizing the access time when the query is being executed.

You are required to solve the problem with the index sequential access method with pros and cons in the given scenario.


Solution:

An indexed file can be used effectively and overcome these problems.ISAM method is an advanced sequential file organization. In this method, records are stored in the file using the primary key. An index value is generated for each primary key and mapped with the record. This index contains the address of the record in the file. Dense & non-dense types of index are maintained, also track the overflow & overflows files are ensured.

 

The following are the pros & cons of ISAM

Pros:

  • This method supports range retrieval and partial retrieval of records. The index is based on the primary key values, So we can retrieve the data for the given range of values. 
  • In ISAM, each record has the address of its data block, searching a record is a huge database is quick and easy.

Cons:

  • When the record is deleted, then the space used by it needs to be released. Otherwise, the performance of the database will slow down.
  • When the new records are inserted, then these files have to be reconstructed.
  • This method requires extra space in the disk to store the index value.

Post a Comment

0 Comments