Which type of relationship is represented by a foreign key in a relational database? MCQ with Answer and Explanation

Which type of relationship is represented by a foreign key in a relational database?
A. All of the above
B. Many-to-many
C. One-to-many
D. One-to-one
Answer: Option A
Solution (By JKExamLibrary)
Foreign keys can represent various relationships, including one-to-one, one-to-many, and many-to-many (via junction tables).

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

Discuss this Question (0)

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

Practice More Database Management System (DBMS) Questions

Question #1 Report Error
What is the purpose of the SQL GROUP BY ... HAVING combination?
A. To select individual rows
B. To join groups
C. To filter groups based on aggregate values
D. To sort groups

Correct Answer: Option C


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 #2 Report Error
What is the purpose of the COMMIT statement in SQL?
A. To save a point within a transaction
B. To permanently save all changes made in a transaction
C. To start a new transaction
D. To undo all changes made in a transaction

Correct Answer: Option B


Explanation:
COMMIT finalizes a transaction, making all changes permanent in the database.

This question belongs to: Computer Database Management System (DBMS)
Question #3 Report Error
Which of the following is a valid SQL function to convert a string to uppercase?
A. TO_UPPER()
B. UPPER()
C. Both A and C
D. UCASE()

Correct Answer: Option C


Explanation:
UPPER() is standard SQL; some DBMS also support UCASE().

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