All Exams Test series for 1 year @ ₹349 only
Question

Given a relation scheme R(x, y, z, w) with functional dependencies set F = {x → y, z → w}. All attributes take single and atomic values only.

A. Relation R is in First Normal FORM

B. Relation R is in Second Normal FORM

C. Primary key of R is xz

Choose the correct answer from the options given below :

The correct answer is

A and C only

Understanding Relation R and Functional Dependencies

The problem describes a relational scheme R with attributes x, y, z, and w. We are given a set of functional dependencies (FDs): {x → y, z → w}. It's also stated that all attributes take single and atomic values. We need to evaluate three statements about this relation: its normal form and its primary key.

Analyzing Statement A: Relation R is in First Normal Form (1NF)

A relation is in First Normal Form (1NF) if and only if all attribute values are atomic and single-valued. The problem explicitly states that "All attributes take single and atomic values only." This directly matches the definition of 1NF.

Therefore, Statement A is true.

Determining the Primary Key of Relation R

A primary key is a minimal set of attributes that uniquely identifies each tuple in the relation. We can find candidate keys by examining the functional dependencies.

  • Attributes on the right-hand side (RHS) of the FDs are {y, w}. These attributes are determined by other attributes.
  • Attributes not on the RHS of any FD are {x, z}. These attributes must be part of any candidate key, as they cannot be determined by other attributes.

Let's check the closure of {x, z} to see if it can determine all attributes in R:

{x, z}<sup>+</sup>

  • Initially, {x, z}<sup>+</sup> = {x, z}.
  • From x → y, since x is in {x, z}<sup>+</sup>, we add y. {x, z}<sup>+</sup> = {x, z, y}.
  • From z → w, since z is in {x, z}<sup>+</sup>, we add w. {x, z}<sup>+</sup> = {x, z, y, w}.

Since {x, z}<sup>+</sup> = {x, y, z, w}, the set {x, z} is a candidate key. To be a primary key, it must be minimal. Can we remove x or z and still determine R?

  • {x}<sup>+</sup> = {x, y}. Does not contain z or w. {x} is not a key.
  • {z}<sup>+</sup> = {z, w}. Does not contain x or y. {z} is not a key.

Since neither {x} nor {z} is a key, {x, z} is a minimal candidate key. Therefore, {x, z} can be the primary key of R.

Thus, Statement C is true.

Analyzing Statement B: Relation R is in Second Normal Form (2NF)

A relation is in Second Normal Form (2NF) if it is in 1NF and every non-prime attribute is fully functionally dependent on every candidate key.

  • We've established R is in 1NF.
  • The candidate key is {x, z}.
  • Prime attributes are the attributes that are part of the candidate key: x, z.
  • Non-prime attributes are the attributes not part of the candidate key: y, w.

Now we check if the non-prime attributes (y, w) are fully dependent on the candidate key {x, z}. This means we must check for partial dependencies, where a non-prime attribute is dependent on a proper subset of a candidate key.

  • Consider the non-prime attribute y. We have the FD x → y. The determinant x is a proper subset of the candidate key {x, z}. This is a partial dependency.
  • Consider the non-prime attribute w. We have the FD z → w. The determinant z is a proper subset of the candidate key {x, z}. This is another partial dependency.

Since there are partial dependencies (x → y and z → w) where non-prime attributes are dependent on a proper subset of the candidate key, the relation R is not in 2NF.

Therefore, Statement B is false.

Summary of Findings

Based on our analysis:

  • Statement A: Relation R is in First Normal FORM - True
  • Statement B: Relation R is in Second Normal FORM - False
  • Statement C: Primary key of R is xz - True

The correct answer corresponds to statements A and C being true, and B being false.

Statement Evaluation Reason
A. Relation R is in First Normal FORM True Attributes are single and atomic valued (given).
B. Relation R is in Second Normal FORM False Existence of partial dependencies (x → y, z → w) on the candidate key {x, z}.
C. Primary key of R is xz True {x, z} is a minimal set of attributes that determines all other attributes in R.

Revision Table: Database Normalization Concepts

Normal Form Requirements Explanation
1NF (First Normal Form) All attribute values must be atomic and single-valued. No repeating groups. Ensures data is stored in a basic table structure with no complex data types or multi-valued attributes within a single cell.
2NF (Second Normal Form) Must be in 1NF and every non-prime attribute must be fully functionally dependent on every candidate key. Eliminates partial dependencies by ensuring non-key attributes depend on the entire candidate key, not just a part of it.
3NF (Third Normal Form) Must be in 2NF and no non-prime attribute is transitively dependent on a candidate key. Eliminates transitive dependencies by ensuring non-key attributes do not depend on other non-key attributes.

Additional Information: Functional Dependencies and Keys

Functional dependencies (FDs) are constraints between attributes in a relation that specify how one attribute or set of attributes determines another. They are fundamental to database design and normalization.

  • Determinant: The attribute(s) on the left-hand side of an FD (e.g., x in x → y).
  • Dependent: The attribute(s) on the right-hand side of an FD (e.g., y in x → y).
  • Candidate Key: A set of attributes K is a candidate key for a relation R if:
    • K functionally determines all attributes in R (K → R).
    • K is minimal (no proper subset of K functionally determines R).
  • Primary Key: One of the candidate keys chosen by the database designer to uniquely identify tuples.
  • Prime Attribute: An attribute that is part of *any* candidate key.
  • Non-prime Attribute: An attribute that is not part of *any* candidate key.

Understanding these concepts is crucial for evaluating the normal form of a relation and ensuring a good database design that minimizes redundancy and anomalies.

Was this answer helpful?

Important Questions from Normal Form - Teaching

  1. Consider a schema R(A, B, C, D) and following functional dependencies.

    A → B

    B → C

    C → D

    D → B

    Then decomposition of R into R 1(A, B), R 2(B, C) and R 3(B, D) is _______

  2. If every non-key attribute is functionally dependent on the primary key, then the relation is in _______.

  3. Consider a relation R (A, B, C, D, E, F, G, H), where each attribute is atomic, and following functional dependencies exist.

    CH → G

    A → BC

    B → CFH

    E → A

    F → EG

    The relation R is ______.

  4. For a database relation R(a, b, c, d) where the domains of a, b, c, and d include only atomic values, and only the following functional dependencies and those that can be inferred from them hold:

    a → c

    b → d

    The relation is in.
  5. Match List I with List II:

    List IList II
    (A)BCNF(I)It removes multivalued dependency
    (B)3 NF(II)It is not always dependency preserving
    (C)2 NF(III)It removes transitive dependency
    (D)4 NF(IV)It removes partial functional dependency

    Choose the correct answer from the options given below:

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App