Study smarter with Fiveable
Get study guides, practice questions, and cheatsheets for all your subjects. Join 500,000+ students with a 96% pass rate.
Database security isn't just about keeping hackers out—it's about understanding the defense-in-depth approach that protects data at every layer of a system. You're being tested on how authentication, encryption, access control, and monitoring work together to maintain the CIA triad: confidentiality, integrity, and availability. Exam questions often ask you to identify which security measure addresses a specific threat or why multiple layers of protection are necessary.
Don't just memorize a list of security tools. Know what each measure protects against, how it fits into the broader security architecture, and when you'd choose one approach over another. The best exam answers demonstrate that you understand the underlying principles—why we encrypt data in transit differently than data at rest, or why input validation prevents attacks that firewalls can't catch. Master the concepts, and the specific implementations become easy to recall.
The first line of defense is ensuring only legitimate users can reach your data. These measures answer the fundamental question: who are you, and what are you allowed to do?
Compare: Access Control vs. Least Privilege—both restrict what users can do, but access control defines who can enter, while least privilege defines how much they can do once inside. FRQs often ask you to explain why both are necessary.
Even if attackers bypass access controls, these measures ensure the data they steal is useless. This layer protects the information itself rather than the systems around it.
Compare: Encryption vs. Masking—encryption is reversible with the right key (useful for production data you need to read later), while masking is typically irreversible (useful when you never need the original values). Know which to recommend based on the use case.
These measures create barriers between your database and potential threats, filtering malicious traffic before it reaches your data.
Compare: Database Firewalls vs. Input Validation—firewalls monitor traffic externally and can block attacks from any source, while input validation is implemented in application code and prevents malformed data from being processed. Both are necessary because neither is foolproof alone.
Security isn't just prevention—it's also detection and recovery. These measures ensure you know when something goes wrong and can bounce back.
Compare: Auditing vs. Backups—auditing helps you detect and investigate security incidents, while backups help you recover from them. An FRQ might ask which addresses availability (backups) versus which addresses accountability (auditing).
Security is not a one-time configuration—it requires ongoing vigilance as new vulnerabilities emerge.
| Concept | Best Examples |
|---|---|
| Identity Verification | Access Control, Multi-Factor Authentication |
| Permission Management | RBAC, Principle of Least Privilege |
| Data Protection | Encryption, Data Masking, Tokenization |
| Perimeter Defense | Network Firewalls, Database Firewalls, VPNs |
| Attack Prevention | Input Validation, Parameterized Queries |
| Detection & Accountability | Auditing, Monitoring, Log Analysis |
| Recovery & Availability | Backups, Recovery Plans, RPO/RTO |
| Ongoing Maintenance | Patch Management, Security Updates |
Which two security measures both protect data confidentiality but differ in whether the protection is reversible? Explain when you'd use each.
A company discovers that a developer account was used to export the entire customer database. Which security measures failed, and which would have helped detect or prevent this?
Compare and contrast database firewalls and input validation—what types of attacks can each prevent, and why might one succeed where the other fails?
An FRQ describes a system where test environments use copies of production data. Which security measure should be implemented, and why is encryption alone insufficient?
How do the Principle of Least Privilege and Role-Based Access Control work together? Could you implement one without the other effectively?