Bird
0
0

What is the primary function of a junction table in relational databases when modeling many-to-many relationships?

easy📝 Conceptual Q1 of 15
SQL - Table Relationships
What is the primary function of a junction table in relational databases when modeling many-to-many relationships?
ATo enforce one-to-one relationships between tables
BTo store detailed information about one entity only
CTo replace primary keys with surrogate keys
DTo link two tables by storing pairs of foreign keys
Step-by-Step Solution
Solution:
  1. Step 1: Understand many-to-many relationships

    Many-to-many relationships cannot be directly represented in relational databases without an intermediary.
  2. Step 2: Role of junction table

    A junction table stores pairs of foreign keys from the two related tables, effectively linking them.
  3. Final Answer:

    To link two tables by storing pairs of foreign keys -> Option D
  4. Quick Check:

    Junction tables hold foreign key pairs [OK]
Quick Trick: Junction tables link tables via foreign keys [OK]
Common Mistakes:
MISTAKES
  • Thinking junction tables store entity details
  • Confusing junction tables with lookup tables
  • Assuming junction tables enforce one-to-one relations

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes