data validation / verification / security / errors / testing Flashcards
data validation definition
checks if data conforms to a set of specific requirements (to avoid errors)
data validation methods
length check
range check
format check
presence check
check digit
types of error that check digits usually detect
letter/digit errors (eg. I <—> 1)
single-digit errors (eg. 1 <—> 2)
transposition errors (eg. 21 <—> 12)
data verification definition
ensures data entered is what user intended
data verification methods
double entry
proof-reading data
checksum
how should data backups be carried out
- carried out regularly (so that backups not too outdated)
- shld be stored offsite by copying info to physical storage like hard disk (so tht disasters causing loss of org data unlikely to affect backup)
- shld be tested regularly to ensure that backups can be restored wo error
why backup?
- in case of catastrophic data loss, can restore data from most recent data backup
- minimises disruption to business operations
why archive?
- to free up storage resources for frequently used data
- done by archiving data to cheaper storage
name the 3 errors
- syntax error
- runtime error
- logic error
give 3 examples of runtime error
- infinite loop, keep repeating code till it crashes / memory runs out
- infinite recursion, keep calling itself with (changes to parameter) till it crashes / memory runs out
- input too large in recursion, max recursion limit exceeded / stack overflow (call stack runs out of memory)
why didnt data testing identify error that occurred during runtime?
- duration of the test is not long enough
- way of testing is incorrect / insufficient
application: if crash due to too much memory used –> data testing neglected some parts of the program bc usually only test if output right/wrong but X test how much memory it uses
why infinite while loop occurs?
- program X reach terminating condition whr (state condition)
- (why X reach terminating condition) bc val (in condition) is not decremented/incremented