Database Security MCQs

Topic-wise practice questions for Database Management Systems. Test your knowledge, check solutions on demand, and pace your preparation.

Zero-leak answer engine • Rate-limited explanations
Practice in Timed Mode
Q1medium
A medical database contains sensitive patient data. The DBA creates the following object. What security benefit does this provide?
Q2hard
A newly hired intern needs to generate a report on monthly sales. The intern should be able to read the Orders and Products tables but must not be able to modify them or see the Salaries table. Which security principle is the DBA applying by granting only SELECT on those two specific tables? ◦ ◦
Q3easy
Which of the following is the primary goal of Database Auditing?
Q4medium
A company needs to show customer support agents the last 4 digits of a credit card number (e.g., XXXX-XXXX-XXXX-1234) but hide the rest. Which database security technique is specifically used for this?
Q5hard
A web application takes a username from a login form and builds a query like this:

"SELECT * FROM Users WHERE username = '" + userInput + "';"
An attacker enters ' OR '1'='1 into the field. What is the most effective architectural way to prevent this SQL Injection attack?
Q6medium
An auditor reviews the following system log. Which security vulnerability is being attempted here? db-audit-log

[2023-10-01 12:00] User: 'guest_acc'
[2023-10-01 12:00] Query: SELECT * FROM users WHERE id = 1; DROP TABLE
Q7medium
Trace the result of the following DCL commands. Can 'User_A' delete records from the Logs table at Time T4?
Q8medium
A financial organization requires that the person who writes the software to update account balances must not be the same person who administers the production database. This is a classic example of:
Q9easy
What is the primary architectural difference between Data-at-Rest Encryption and Data-in-Transit Encryption?
Q10medium
In a highly secure government database, access is granted based on the sensitivity label of the data (e.g., Top Secret) and the clearance level of the user. The user cannot pass their access rights to others. This is known as: