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
Direct Access File: need for organisation
- Data in the overflow area is searched in a linear manner
- When there are many items in the overflow area, access becomes slower
- A new hashing algorithm is required and a larger file may be needed
Validation
- A check to ensure that data is sensible and reasonable
- Check against a set of rules setup in a program
- Only proves that data is reasonable, not correct
Types of Validation
Range Check
Presence Check
Length Check
Type Check
Format Check
Lookup Check
Verification
A check ensuring that data has been copied correctly from one medium to another
Double Entry verification
- data is entered twice
- 2 sets of data are compared to check that they match
- If no match, it is rejected
Multi Level index
- Main index contains the location of the next index
- could extend to several levels
- last level contains the physical address of the record