8.2.2 Data Integrity, Access Rights and Recovery
Data integrity concerns the accuracy, completeness and consistency of stored data. Constraints, permissions and backups support integrity and protection in different ways.
By the end of this page, you should be able to:
- define and use the key terms accurately;
- explain how the idea works using a new example;
- apply the idea to a database design or SQL task.
1. Integrity is about trustworthy data
Data integrity means data remains accurate, complete and consistent. A database can support integrity with data types, validation checks, primary keys, foreign keys and carefully controlled changes. These controls reduce mistakes; they cannot guarantee that every entered fact is true.
2. Validation checks rules, not truth
A range check may reject a rating outside 1β5. A type check may require a date. A value can still be valid according to the rules but factually wrong, such as selecting the wrong but existing customer.
3. Access rights limit actions
Access rights state which actions a user may perform, such as read, insert, update or delete. A person who schedules appointments may need to add bookings but not change payroll records. Give each role only the permissions needed.
4. Backups support restoration
A backup is a stored copy that can be used to restore data after loss or damage. Backups should be made regularly, protected from unauthorised access and tested so the organisation knows restoration works.
Worked example
A clinic accepts appointment dates only within the coming year, limits reception staff to booking fields and keeps protected daily backups. The date rule checks an input condition; role permissions restrict edits; backups support recovery.
Common mistake to avoid
Validation, access rights and backup solve different problems. Validation checks input rules; permissions control actions; backups provide a way to restore data.
Interactive check
Choose an answer, read the explanation, and continue to the next example.
Independent practice
Try this original question before opening the suggested response.
A repair service wants to reduce invalid booking dates, limit staff access to customer payment details and recover records after a server failure. Recommend one control for each aim. (3)
Suggested response
Use a validation rule for booking dates. Restrict payment fields using access rights so only authorised staff can read or update them. Make and protect regular backups that can be restored after server failure.
Answering clearly
Use the technical term, state what it does, and connect your explanation to the details in the question.