You are on page 1of 4

SIR SYED UNIVERSITY OF ENGINEERING AND

TECHNOLOGY
INTRODUCTION TO DATABASE MANAGMENT SYSTEM
(SWE 209)

ASSIGNMENT # 3

Submitted by :
Muhammad Fahad Siddiqui (2019-SE-206)
Semester: 4th
Batch: 2019
Section: E

Submitted to :
Sir Shariq-uz-Zaman Durrani

1
ASSIGNMENT # 3
Question 1
Find all possible candidates keys? R (A, B, C, D, E, F)
FD’S = {AB → C, C → DE, E → F, F →A}

Answer.

AB→C
C→DE
E→F
F→A
(B)+ →B
[BC]+ →B
[BE]+ →BCDEFA
[BE]+ →BEFA
[BE]+ →BFA

[BC, BE, BF]

Question 2
Define anomalies with its types? Use your own examples only

Answer.
ANOMALIES AND ITS TYPE:-
The anomalies naturally occur and result in data that
does not match the real-world the database purports to represent Anomalies are caused when there
is to too much redundancy in the database’s information.
There are three types of Data Anomalies.

Update Anomalies:
It is used when the person has to keep the records current and accurate
for example:
If we have to change or update Students information and detail in a university database then we use
update anomalies

2
Insert Anomalies:
The nature of the database may be such that it is not possible to add a
required piece of data unless another piece of unavailable data is also needed.
For example:
It refers to that if you have some raw data then you have to insert it in a table to make it more
systematic.

Delete Anomalies:
It occurs when the deletion unwanted information causes desired information
to be deleted as well.
For example:
If you delete students name from the database table so the whole information of student will be
deleted.

Question 3
Find the canonical covers of F and G
F= {A → B, AB → C, D → AC , D →E }
G = {A →BC, D → AB }
Which of the following condition is true?
1) F Covers G
2) G covers F
3) Both are equal
4) None of the above.

Answer.

First of all:
A→B
AB→C
D→A
D→C by decomposition
D→E

We will do
𝐴+ 𝐵+
𝐴𝐵 𝐵

Now
A→B
A→C now all the attributes are singleton.
D→A
D→C
D→E

𝐴+ 𝐴+ 𝐷+ 𝐷+
𝐴𝐶 𝐴𝐵 𝐷𝐶𝐸 𝐷𝐴𝐶𝐸𝐵

3
So, D→C is a redundant functionally and we will remove it
For G:
A→B
A→C
D→A
D→B

𝐴+
𝐴𝐶

So, None of them cover to each other.

You might also like