DBMS · Question 22 · Medium

DBMS question 22

A one-to-many relationship 'works in' links Department (one) to Employee (many). When it is mapped to relational tables, where is the foreign key normally placed?

  1. In the Employee table, referring to the Department's primary key
  2. In the Department table, referring to the Employee's primary key
  3. In a separate table that is always required for every 1:N relationship
  4. In both tables, each referring to the other
Answer and explanation

Answer: A. In the Employee table, referring to the Department's primary key

Explanation: Each employee works in exactly one department, so a single dept_id column in Employee captures the relationship. Placing it in Department would need many values per row.

Previous: Relation R(A, B, C, D, E) has the functional dependencies A → B, BC → D and D… · Next: Relation R has 3 attributes and 5 tuples, and relation S has 4 attributes and…

Practise dbms

Try a fresh set of dbms questions with an explanation after every answer, free and without signing up: DBMS practice. Or sit a full placement mock test.

More dbms questions

More technical & programming practice

SQL · Operating Systems · Computer Networks · Software Engineering · Cloud & DevOps · GenAI Basics · Pseudo-code · C Programming

LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge