SQL MCQs – Database Administration and Security

21.) How can user activity be restricted during maintenance?

A) By revoking all permissions
B) By switching to read-only mode
C) By shutting down the database
D) By locking the database

Answer: Option B

Explanation: Read-only mode allows access without permitting any changes.

22.) What is a security patch in database systems?

A) A fix for identified vulnerabilities
B) A new feature added to the database
C) A tool to optimize queries
D) A backup of the database

Answer: Option A

Explanation: Security patches address vulnerabilities to protect the database from threats.

23.) What does the term “two-factor authentication” (2FA) mean?

A) Using two databases for authentication
B) Using two levels of encryption
C) Verifying identity with two methods (e.g., password and OTP)
D) Authenticating two users simultaneously

Answer: Option C

Explanation: 2FA adds an extra layer of security by requiring two distinct methods of verification.

24.) How does database mirroring enhance security?

A) By encrypting data
B) By replicating data to a standby server
C) By auditing user activities
D) By preventing SQL injection

Answer: Option B

Explanation: Mirroring maintains a copy of the database on another server for redundancy and recovery.

25.) What is the purpose of using roles in database security?

A) To group permissions for easier management
B) To encrypt sensitive data
C) To optimize query performance
D) To create backup strategies

Answer: Option A

Explanation: Roles simplify permission management by grouping privileges.

26.) Which command is used to remove a user in SQL?

A) DROP USER
B) DELETE USER
C) REMOVE USER
D) ALTER USER

Answer: Option A

Explanation:DROP USER removes a user from the database.

27.) What is a “transaction log” in database management?

A) A record of all database queries
B) A record of all changes made to the database
C) A method for locking tables
D) A schema for normalization

Answer: Option B

Explanation: Transaction logs maintain records of database modifications for recovery and auditing.

28.) What is the role of a public key in asymmetric encryption?

A) To encrypt data
B) To decrypt data
C) To store database logs
D) To create indexes

Answer: Option A

Explanation: In asymmetric encryption, the public key encrypts data, and the private key decrypts it.

Leave a Reply

Your email address will not be published. Required fields are marked *