What is the purpose of a Foreign Key? MCQ with Answer and Explanation

What is the purpose of a Foreign Key?
A. To link two tables and enforce referential integrity
B. To sort data
C. To create indexes
D. To uniquely identify records
Answer: Option A
Solution (By JKSSB Mock Tests)
A foreign key establishes a relationship between tables and maintains referential integrity.

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1
What is the main purpose of indexing in a database?
A. To speed up data retrieval
B. To backup data
C. To delete data
D. To encrypt data

Correct Answer: Option A


Explanation:
Indexes improve the speed of data retrieval operations on a database table.

This question belongs to: Computer Database Management System (DBMS)
Question #2
What is the purpose of the SQL GROUP BY ... HAVING combination?
A. To select individual rows
B. To join groups
C. To sort groups
D. To filter groups based on aggregate values

Correct Answer: Option D


Explanation:
HAVING is used in conjunction with GROUP BY to filter groups based on conditions applied to aggregate functions.

This question belongs to: Computer Database Management System (DBMS)
Question #3
In SQL, which statement is used to change a user's password?
A. MODIFY USER
B. UPDATE USER
C. ALTER USER
D. CHANGE USER

Correct Answer: Option C


Explanation:
ALTER USER is used in many DBMS to change user attributes, including password. The exact syntax varies by DBMS.

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