Serial
- Uses variable length records
- New records are added to the end of the file
- Not in order apart from the order they were inputted
- Fastest type of file organising
- Example: record of all outgoing calls in a day
Sequential
- Uses fixed length records
- Store data in order of key
- Can be searched with binary search
- Much easier to search for a specific value but more difficult to insert a new record
<aside>
👉 Adding a record
1. Data in the current file is copied into a temporary file
2. This is done record by record until the place where the record that needs to be inserted is reached
3. Record inserted in the correct place and rest of the records copied over
4. Old file deleted - temporary file becomes the new file
For deleting - same process but the unwanted record is simply not copied over when the temp file is created
</aside>
Indexed Sequential
- Data is split up into logical chunks which relate to ordered data
- Used to improve search times with large amounts of data
- Complex to insert/remove records as the indexes for every group are modified
- Index is made up of two components - a sequential file and an index
- Direct access to a specific record without needing to read the rest of the file
Random/Direct Access
- The exact location can be jumped to using the primary key