2.4 Flashcards
File
Set of related records
Record
A collection of related fields (treated as one unit for processing)
Field
A single data item
Fixed Length Record
- Same number of bytes in each record
- Wated memory in the field
- Faster to process
- Easier to program
- May not be enough space in field
Variable length Record
- Has a different number bytes in each record
- No wasted memory
- Harder to program
- Slower to process
- Data will not be truncated
Master File
A file containing relatively permanent information usually updated periodically
Transaction File
Collection of records used in batch processing to update a master file
Full Backup: Gererations
- Keep 3 latest Master and Transaction file
- Grandfather - Father - Son
- If one version is corrupted, the previous versions are still available
Incremental Backup: Transaction Logs
- Saves storage space and is faster
- Only backs up data that has changed and replaces older backups
- restores database to a point in time
- all log records are required to replay database changes up to that point in time
Archiving
The process of freeing up data on a computer system that is no longer in use but is kept for historical/security reasons and is stored securely off site
Serial
Records are added to transaction file in the order they are recieved
Sequential
- Records are stored in master file in key field order
- Used as records are normally accessed in order to update an entire file
Indexed Sequential
- Index allows for data to be accessed directly
- Records are saved in blocks stored sequentially
- Locate records using index block pointers
Indexed sequential advantages
- Fast searching using index
- Could be faster than searching overflow area
- Easy to add further records by adding extra data blocks and index pointers
Direct Access File: Need for overflow
- Data collision occurs when 2 records are hashed to the same location
- A flag is set adn the latest data is stored in a seperate file called the overflow area