Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Sppu Assignment No.

6 (Theory)
Q.1)Compare between sequential access file and random access file?

https://www.tech21century.com/sequential-vs-random-access-
drives/#:~:text=Sequential%20Access%20to%20a%20data,anywhere
%20in%20the%20data%20file.

Q.2) Write a short note on Organization of record into blocks?

1. As data is transferred in blocks, it is convenient to assign records to blocks in


such a way that a block contains related records.
o For fixed-length record representation of variable-length records we may
use several records to represent one variable-length record.
o We'd like to store these records together.
o However, when a new account is opened the block may be full.
o We must then either move a record or abandon our goal of grouping.
o An alternative uses a bit more space, but gives greater efficiency in data
access.
o We assign one bucket to each bname value.
o This bucket holds the entire variable-length record for the
corresponding bname value.
o A bucket consists of as many blocks as necessary, but buckets never
share blocks (figure 7.13)
o The first record in the bucket holds the bname value for that bucket.
o Subsequent records are repeating fields in the same bucket. (So no need
to chain records together.)
2. In figure 7.13, a bucket occupies one block. In a more realistic example, a
bucket may require several blocks.
o We chain blocks of a bucket together.
o Block header at beginning of each block and pointers - see figure 7.14.
o We can have a chain of unused (empty) blocks for insertions.
o However, we would like all the blocks for a bucket to be stored on the
same cylinder of a disk.
o If we reserve emptied blocks for the buckets that release them, we could
get a lot of empty blocks, if deletion is more frequent than insertion.
o In practice this tends to work well.
o When buckets become sufficiently disorganized that performance begins
to suffer, the database can be re-organized.
 Database is copied to tape.
 Database is reloaded with blocks relocated so that buckets are no
longer fragmented, and reasonable room for bucket growth exists.

Q.3) Write a short note on Sequential file from file organization?

Q.4) What is Inverted File Organization?


https://www.yourarticlelibrary.com/management/mis-management/top-6-models-of-file-
organization-with-diagram/70369

You might also like