What is a composite key in a database? MCQ with Answer and Explanation

What is a composite key in a database?
A. A key that references another table
B. A key that is always a foreign key
C. A key that is made up of multiple columns
D. A key that is a single column
Answer: Option C
Solution (By JKSSB Mock Tests)
A composite key is a primary key that consists of two or more columns to uniquely identify a row.

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1
Which wildcard character is used with the SQL LIKE operator to represent zero, one, or multiple characters?
A. Hash (#)
B. Percentage sign (%)
C. Underscore (_)
D. Ampersand (&)

Correct Answer: Option B


Explanation:
The percentage sign (%) is used as a wildcard character to match any sequence of zero or more characters in an SQL LIKE string comparison query.

This question belongs to: Computer Database Management System (DBMS)
Question #2
What is the purpose of the SQL 'DEFAULT' constraint?
A. To set a foreign key
B. To provide a default value for a column when no value is supplied
C. To define a primary key
D. To enforce uniqueness

Correct Answer: Option B


Explanation:
DEFAULT assigns a default value to a column if an INSERT statement does not specify a value.

This question belongs to: Computer Database Management System (DBMS)
Question #3
Which of the following ensures data integrity in RDBMS?
A. User input without checks
B. Constraints like primary key, foreign key
C. Random data entry
D. No validation rules

Correct Answer: Option B


Explanation:
Integrity constraints such as keys enforce rules for valid data.

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