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

What is a foreign key in a database table?
A. A column that references the primary key of another table
B. A key that is always indexed
C. A key that allows null values
D. A key used to uniquely identify records in the same table
Answer: Option A
Solution (By JKSSB Mock Tests)
A foreign key is a field in one table that links to the primary key of another table, establishing a relationship between tables.

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 concept of data independence?
A. The ability to move data between tables
B. The ability to store data in different formats
C. The ability to change the database schema without affecting the application programs
D. The ability to access data from multiple sources

Correct Answer: Option C


Explanation:
Data independence is the capacity to change the database schema at one level without affecting the next higher level, minimizing impact on applications.

This question belongs to: Computer Database Management System (DBMS)
Question #2
Which SQL command is used to modify the structure of an existing table?
A. MODIFY
B. UPDATE
C. CHANGE
D. ALTER

Correct Answer: Option D


Explanation:
ALTER TABLE is a DDL command used to add, delete, or modify columns and constraints in an existing table.

This question belongs to: Computer Database Management System (DBMS)
Question #3
What happens when a database transaction triggers a 'COMMIT' statement?
A. The transaction is aborted and wiped.
B. All changes made by the transaction are made permanent on disk storage.
C. The transaction pauses temporarily.
D. The database structure is dropped.

Correct Answer: Option B


Explanation:
Executing a COMMIT statement instructs the database engine to save all data updates performed during the transaction permanently into physical storage.

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