0% found this document useful (0 votes)
63 views2 pages

Assignment Dsa 5 &6

This document discusses various file organization techniques: 1) It compares sequential access files, which are accessed sequentially from beginning to end, and random access files, which can be accessed randomly at any location. 2) It describes how records are organized into blocks for storage, with related records stored together in buckets that can span multiple blocks chained together. Empty blocks are reserved for buckets that release them. 3) Sequential files organize records one after the other from beginning to end to optimize sequential access. 4) Inverted files store a list of documents associated with each keyword, allowing fast retrieval of documents containing a given keyword.

Uploaded by

raksha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views2 pages

Assignment Dsa 5 &6

This document discusses various file organization techniques: 1) It compares sequential access files, which are accessed sequentially from beginning to end, and random access files, which can be accessed randomly at any location. 2) It describes how records are organized into blocks for storage, with related records stored together in buckets that can span multiple blocks chained together. Empty blocks are reserved for buckets that release them. 3) Sequential files organize records one after the other from beginning to end to optimize sequential access. 4) Inverted files store a list of documents associated with each keyword, allowing fast retrieval of documents containing a given keyword.

Uploaded by

raksha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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