Chapter 10: Problem 6
What are the two types of file access? What is the difference between these two?
Short Answer
Expert verified
Answer: The two types of file access are sequential file access and random (or direct) file access. The main differences between them are:
1. Sequential file access requires data to be accessed in a consecutive order, while random file access allows data to be accessed directly at any position within the file.
2. Sequential file access tends to be slower compared to random file access, as it requires reading or processing preceding data before accessing the target data.
3. Sequential file access is more suitable for tasks where the order of records matters, while random file access is better for tasks that require direct access to specific records without processing other records.