0% found this document useful (0 votes)
98 views3 pages

Alevel 1 DBMS 26may2020 AV

This document discusses database normalization up to third normal form (3NF). It provides two examples of relations and their functional dependencies and determines if the relations are in 3NF. If not, it decomposes the relations into 3NF. For the first relation R(ABCDE), it is decomposed into four relations R1(ABE), R11(AB), R12(BE), R2(CD) and R3(AC) to satisfy 3NF. For the second relation R(ABCDEFGHIJ), it is decomposed into five relations R1(ABC I), R11(ABC), R12(AI), R2(ADGHJ), R21(ADGH), R22(HJ), R3

Uploaded by

ayush das
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views3 pages

Alevel 1 DBMS 26may2020 AV

This document discusses database normalization up to third normal form (3NF). It provides two examples of relations and their functional dependencies and determines if the relations are in 3NF. If not, it decomposes the relations into 3NF. For the first relation R(ABCDE), it is decomposed into four relations R1(ABE), R11(AB), R12(BE), R2(CD) and R3(AC) to satisfy 3NF. For the second relation R(ABCDEFGHIJ), it is decomposed into five relations R1(ABC I), R11(ABC), R12(AI), R2(ADGHJ), R21(ADGH), R22(HJ), R3

Uploaded by

ayush das
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

National Institute of Electronics & Information Technology (NIELIT), Gorakhpur

राष्ट्रीय इलेक्ट्रॉनिकी एवं सूचिा प्रौद्योनगकी संस्थाि ,गोरखपुर

Course Name: A Level (1st Sem) Subject : Introduction to DBMS


Topic: DB Normalization – Exercise Practices on 3NF (Part 9) Date: 26-May-2020
------------------------------------------------------------------------------------------------------------------------------------------
Database Normalization – Exercise Practices on 3NF

Q.1 Suppose a relational schema R (A B C D E) and set of functional dependencies


F: { A B
B E
C D }

Check out that relation is in 3NF or not? If not decompose it in 3NF.

Solution1:
Firstly find the candidate key in the relation:
(AC)+ = ABCDE
AC is the candidate key, because closure of AC has all the attributes of R.
Prime attributes: AC
Non prime attributes: BDE

A relation is said to be 3NF, if it holds at least one of the following for every non
trivial functional dependency α β:
 α is super key.
 β is prime attribute.

A B -- Neither A is super key, nor B is prime attribute.

B E -- Neither B is not super key, nor E is prime attribute.

C D -- Neither C is not super key, nor D is prime attribute.

So, the relation is not in 3NF as it is not following the rules of 3NF.

Prepared By
National Institute of Electronics & Information Technology (NIELIT), Gorakhpur
राष्ट्रीय इलेक्ट्रॉनिकी एवं सूचिा प्रौद्योनगकी संस्थाि ,गोरखपुर

Therefore, R(ABCDE) needs to be divided into following:


R1(A B E) R11 (A B)
R2 (C D) R12 (B E)
R3(A C)
Now R11, R12, R2, R3 are in 3NF.

Q.2 Suppose a relational schema R (A B C D E F G H I) and set of functional


dependencies
F: { AB C,
AD GH,
BD EF,
A I,
H J }
Check out that relation is in 3NF or not? If not decompose it in 3NF.

Solution 2:
Firstly find the candidate key in the relation:
(ABD)+ = A B C D E F G H I
ABD is the candidate key, because closure of ABD has all the attributes of R.
Prime attributes: A B D
Non prime attributes: C E F G H I
A relation is said to be 3NF, if it holds at least one of the following for every non
trivial functional dependency α β:
 α is super key.
 β is prime attribute.

Prepared By
National Institute of Electronics & Information Technology (NIELIT), Gorakhpur
राष्ट्रीय इलेक्ट्रॉनिकी एवं सूचिा प्रौद्योनगकी संस्थाि ,गोरखपुर

AB C -- Neither AB is super key, nor C is prime attribute.

AD GH -- Neither AD is not super key, nor GH is prime attribute.

BD EF -- Neither BD is not super key, nor EF is prime attribute.

A I -- Neither A is not super key, nor I is prime attribute.

H J -- Neither H is not super key, nor J is prime attribute.

So, the relation is not in 3NF as it is not following the rules of 3NF.

Therefore, R(ABCDE) needs to be divided into following:


R1(A B C I) R11 (A B C)
R12 (A I)
R2 (A D G H J) R21 (A D G H)
R22 (H J)
R3(B D E F)
R4(A B D)
Now R11, R12, R21, R22, R3, R4 are in 3NF.

Exercise:
1. Suppose R (A B C D E F G H I J) and set of FDs
F : { AB C,
A DE,
B F,
F GH,
D IJ }
The above table is normalized up to 3NF or not? If not, decompose it in 3NF.

Prepared By

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy