Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  If every non-key attribute is functionally de... Start Learning for Free
If every non-key attribute is functionally dependent on the primary key, then the relation will be in
  • a)
    First normal form
  • b)
    Third normal form
  • c)
    Second normal form
  • d)
    Fourth normal form
Correct answer is option 'C'. Can you explain this answer?
Verified Answer
If every non-key attribute is functionally dependent on the primary ke...
Conditions for various normal forms:
  1. 1 NF – A relation R is in first normal form (1NF) if and only if all underlying domains contain atomic values only.
  2. 2 NF – A relation R is in second normal form (2NF) if and only if it is in 1NF and every non-key attribute is fully dependent on the primary key.
  3. 3 NF – A relation R is in third normal form (3NF) if and only if it is in 2NF and every non-key attribute is non-transitively dependent on the primary key.
  4. BCNF – A relation R is in Boyce-Codd normal form (BCNF) if and only if every determinant is a candidate key.
Example:
Relation R(XYZ) with functional dependencies {X -> Y, Y -> Z, X -> Z}.
Notice here Y -> Z, in question it is not mention that non prime attribute is only dependent on primary key so this FD is perfectly valid.
This relation is in 2NF but not in 3NF because of every non-key attribute is transitively dependent on the primary key. Here {X} will be candidate key.
View all questions of this test
Most Upvoted Answer
If every non-key attribute is functionally dependent on the primary ke...
Explanation:

To understand why the correct answer is option 'C', we need to understand the concept of normalization in database design.

Normalization is a process of organizing data in a database to reduce redundancy and dependency. It helps to eliminate data anomalies and inconsistencies, and ensure data integrity and consistency.

In normalization, there are several normal forms, each with its own rules and requirements. The most commonly used normal forms are:

1. First normal form (1NF)
2. Second normal form (2NF)
3. Third normal form (3NF)
4. Fourth normal form (4NF)
5. Fifth normal form (5NF)

Now, let's understand each normal form in detail and see how they relate to the question asked.

1. First normal form (1NF):

First normal form (1NF) is the simplest form of normalization, which requires that a relation must have atomic values. In other words, each attribute of a relation must contain only a single, indivisible value.

For example, consider a relation that stores information about students and their courses:

Student ID | Name | Course 1 | Course 2 | Course 3
--------------------------------------------------
1 | John | Math | Science | English
2 | Mary | Science | History | NULL

This relation is not in 1NF because the attributes Course 1, Course 2, and Course 3 contain multiple values, separated by commas. To bring this relation to 1NF, we need to split the multivalued attributes into separate relations:

Student ID | Name
------------------
1 | John
2 | Mary

Student ID | Course
--------------------
1 | Math
1 | Science
1 | English
2 | Science
2 | History

2. Second normal form (2NF):

Second normal form (2NF) requires that a relation must be in 1NF and every non-key attribute must be functionally dependent on the entire primary key.

For example, consider a relation that stores information about orders and their items:

Order ID | Customer ID | Item ID | Item Name | Quantity | Price
----------------------------------------------------------------
1 | 100 | 1 | Widget | 2 | $10
1 | 100 | 2 | Gadget | 1 | $20
2 | 200 | 2 | Gadget | 3 | $20

This relation is not in 2NF because the non-key attribute Item Name is functionally dependent on the Item ID, which is only part of the primary key. To bring this relation to 2NF, we need to split it into two relations:

Order ID | Customer ID | Item ID | Quantity | Price
----------------------------------------------------
1 | 100 | 1 | 2 | $10
1 | 100 | 2 | 1 | $20
2 | 200 | 2 | 3 | $20

Item ID | Item Name
-------------------
1 | Widget
2 | Gadget

3. Third normal form (3NF):

Third normal form (3NF) requires that a relation must be in 2NF and every non-key attribute must be functionally dependent on the primary key, and nothing but the primary key.

For example, consider a relation that stores information about employees and
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

If every non-key attribute is functionally dependent on the primary key, then the relation will be ina)First normal formb)Third normal formc)Second normal formd)Fourth normal formCorrect answer is option 'C'. Can you explain this answer?
Question Description
If every non-key attribute is functionally dependent on the primary key, then the relation will be ina)First normal formb)Third normal formc)Second normal formd)Fourth normal formCorrect answer is option 'C'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about If every non-key attribute is functionally dependent on the primary key, then the relation will be ina)First normal formb)Third normal formc)Second normal formd)Fourth normal formCorrect answer is option 'C'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for If every non-key attribute is functionally dependent on the primary key, then the relation will be ina)First normal formb)Third normal formc)Second normal formd)Fourth normal formCorrect answer is option 'C'. Can you explain this answer?.
Solutions for If every non-key attribute is functionally dependent on the primary key, then the relation will be ina)First normal formb)Third normal formc)Second normal formd)Fourth normal formCorrect answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of If every non-key attribute is functionally dependent on the primary key, then the relation will be ina)First normal formb)Third normal formc)Second normal formd)Fourth normal formCorrect answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of If every non-key attribute is functionally dependent on the primary key, then the relation will be ina)First normal formb)Third normal formc)Second normal formd)Fourth normal formCorrect answer is option 'C'. Can you explain this answer?, a detailed solution for If every non-key attribute is functionally dependent on the primary key, then the relation will be ina)First normal formb)Third normal formc)Second normal formd)Fourth normal formCorrect answer is option 'C'. Can you explain this answer? has been provided alongside types of If every non-key attribute is functionally dependent on the primary key, then the relation will be ina)First normal formb)Third normal formc)Second normal formd)Fourth normal formCorrect answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice If every non-key attribute is functionally dependent on the primary key, then the relation will be ina)First normal formb)Third normal formc)Second normal formd)Fourth normal formCorrect answer is option 'C'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev