Consider the relation Emp–Dept with SSN as key. Which of the following…

2018

Consider the relation Emp–Dept with SSN as key. Which of the following operation(s) is/are invalid?

image.pngimage.png
  1. A.

    Inserting an employee without name and address

  2. B.

    Inserting an employee with only SSN

  3. C.

    Inserting a department with no employee

  4. D.

    Inserting an employee without SSN

Attempted by 1934 students.

Show answer & explanation

Correct answer: D

In the given relation, SSN is the primary key. A primary key cannot be NULL and must uniquely identify each employee. (i) Employee without name and address → Valid (attributes can be NULL unless constrained).

(ii) Employee with only SSN → Valid (primary key is present).

(iii) Department with no employee → Valid (no constraint violation given).

(iv) Employee without SSN → Invalid, because primary key (SSN) cannot be NULL.

Hence, the invalid operation is (iv).

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Up Lt Grade Assistant Teacher 2025