Apply database least privilege and parameterized access.
Plan retention, backup, deletion, and recovery.
Classify data before choosing controls. Database accounts should have only required schema and operation privileges. Encryption at rest helps with media loss, while application authorization protects use. Backups inherit sensitivity and need access control, encryption, retention, restoration tests, and deletion policy.
application role: SELECT on course_view
report role: SELECT on approved_report_view
migration role: schema changes only during controlled deployment
Data minimization reduces both privacy exposure and incident impact. Audit reads and writes where justified, protect logs from unauthorized access, and define whether deletion is logical, physical, or cryptographic according to the system and legal requirements.
Exercises
Create a data classification table.
Design database roles for application, reporting, and migration.
Define backup restore and deletion tests.
Self-check
Does encryption replace authorization?
Why protect backups?
What is data minimization?
Self-Check Quiz
1. What does least-privilege database access reduce?
AnswerThe operations and data an exploited application or account can reach.
2. Why test restoration?
AnswerA backup is not evidence of recoverability until restoration has been verified.
Homework
Design protection for a confidential data store.
Specify roles, encryption boundaries, retention, and audit.
Write a recovery test plan.
Sample answerUse separate scoped roles, TLS for connections, encryption at rest with managed keys, protected and tested backups, minimized collection, retention limits, access auditing, and a restoration exercise that measures recovery point and recovery time.