F452 File handling
Serial file:
- Data is stored in the order that it is added.
- This is known as 'appending' the data.
Sequential file:
- Data is stored according to a key field.
- When writing data to a sequential file all subsequent records need to be moved.
- File modes:
- -Append
- -Create
- -CreateNew
- -OpenOrCreate
- -Read
- -ReadWrite
- -Write
Indexed sequential file:
- Data is arranged according to a key field but uses an index which can find records directly.
Random files:
- Allow data to be stored anywhere in a dedicated section of a disk.
- A hash algorithm (calculation) is performed on a field in the record to be stored.
Size estimation:
- Determine the size in Bytes of each field.
- Add the field sizes.
- Multiply by number of records.
- Add 10% to the result for additional storage/ overhead.
No comments:
Post a Comment