Which of the following is a type of lock in a database? MCQ with Answer and Explanation

Which of the following is a type of lock in a database?
A. None
B. Both A and B
C. Exclusive lock
D. Shared lock
Answer: Option B
Solution (By JKSSB Mock Tests)
Shared locks allow multiple transactions to read a resource, while exclusive locks allow only one transaction to write.

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Database Management System (DBMS) Questions

Question #1
Which SQL function is used to find the maximum value in a column?
A. MIN()
B. MAX()
C. SUM()
D. AVG()

Correct Answer: Option B


Explanation:
MAX() returns the highest value in a selected column.

This question belongs to: Computer Database Management System (DBMS)
Question #2
What is a pivot table in a database context?
A. A stored procedure
B. A type of index
C. A technique to rotate rows into columns for data summarization
D. A view

Correct Answer: Option C


Explanation:
Pivoting transforms data by turning unique values from one column into multiple columns, often for reporting.

This question belongs to: Computer Database Management System (DBMS)
Question #3
What is the difference between a database and a database management system?
A. They are the same
B. DBMS is the data; database is the software
C. A database is the data; DBMS is the software that manages it
D. Database is a file; DBMS is a table

Correct Answer: Option C


Explanation:
A database is a collection of structured data, while a DBMS is the software used to interact with and manage that data.

This question belongs to: Computer Database Management System (DBMS)