What is a database cursor? MCQ with Answer and Explanation

What is a database cursor?
A. A type of index
B. A backup file
C. A user account
D. A control structure that enables traversal over rows in a result set
Answer: Option D
Solution (By JKSSB Mock Tests)
A cursor allows row-by-row processing of query results, often used in procedural extensions of SQL.

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1
In relational database terminology, a row in a table is precisely called a what?
A. Tuple
B. Field
C. Attribute
D. Relation

Correct Answer: Option A


Explanation:
A single row or record in a relational database table is formally called a tuple.

This question belongs to: Computer Database Management System (DBMS)
Question #2
In SQL, the WHERE clause is used in:
A. Only INSERT statements
B. Only CREATE statements
C. SELECT, UPDATE, DELETE statements
D. Only SELECT statements

Correct Answer: Option C


Explanation:
WHERE clause filters records in SELECT, UPDATE, and DELETE operations.

This question belongs to: Computer Database Management System (DBMS)
Question #3
Which constraint ensures that every value in a specific column is unique across all rows in that table, but still permits a NULL value?
A. CHECK
B. UNIQUE
C. FOREIGN KEY
D. PRIMARY KEY

Correct Answer: Option B


Explanation:
The UNIQUE constraint prevents duplicate entries in a column. Unlike a Primary Key, a UNIQUE constraint typically allows one or more rows to store NULL values depending on the database engine.

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