Hi, I would love to answer you with these questions. I hope you
will like an answer and get a clear idea related to the same. So
not wasting the time let's head towards the answers.
Ans.A What is the primary difference
between fixed- and variable-length records?
Fixed-length records :
- Al the records available in the file are of the same size.
- This leads to the wastage of the memory
- Accessing to the records is easier and faster
- Location of the record can be easily and exactly
determined
Variable-length records :
- The different records in the file are of different sizes
- This does not lead to the memory wastage as in the fixed-length
records
- The accessing of the records is slower as compared to that of
the fixed-length records
- When multiple records are to be stored in a file this is
used
Ans.B What happens if a data element is
smaller than the fixed-length of the respective field?
- If the data element is smaller than the fixed-length in the
respective fields than the data element will be stored by padding
up the left length.
Ans.C What happens if a data element is
larger than the fixed-length of the respective field?
- If the data length is larger than the larger-length in the
respective field then it cannot be stored in the respective field
as the length is needed to be fixed of every element and the larger
would not be accepted and for this the variable length record would
be preferred.
Hope you like an answer and get a clear idea for the same
Please like an
answer and do comment for any related queries
Thanks and Happy to help :)
Happy Learning