What is a 'foreign key' constraint specifically designed to prevent? MCQ with Answer and Explanation

What is a 'foreign key' constraint specifically designed to prevent?
A. Unauthorized login attempts to the database.
B. The use of duplicate data values within the primary key column.
C. Slow search execution times.
D. Actions that would destroy links or introduce invalid references between tables.
Answer: Option D
Solution (By JKSSB Mock Tests)
A Foreign Key constraint enforces referential integrity, preventing updates or deletions that would leave orphaned child records pointing to non-existent parent rows.

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 purpose of the SQL 'DEFAULT' constraint?
A. To enforce uniqueness
B. To set a foreign key
C. To define a primary key
D. To provide a default value for a column when no value is supplied

Correct Answer: Option D


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 #2
Which of the following describes an 'Entity' in database terms?
A. A physical server rack.
B. A line connecting tables.
C. An action or method inside code.
D. A real-world object or concept that is distinguishable from other objects and about which data is stored.

Correct Answer: Option D


Explanation:
An Entity is a distinguishable real-world object, place, person, or concept captured within a database schema (e.g., Customer, Product).

This question belongs to: Computer Database Management System (DBMS)
Question #3
A view in DBMS is:
A. An index on the table
B. A virtual table based on the result of a query
C. A backup of the database
D. A physical copy of the table

Correct Answer: Option B


Explanation:
A view is a virtual table derived from one or more base tables.

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