737 views
0 votes
0 votes

If table is has only two  coloumns,in which normal form would it be? 

5 Answers

Best answer
1 votes
1 votes

2 columns means 2 attributes , A relation R with two attributes then R will always  in BCNF

let R (A,B)

1) A → B  ⇒ BCNF (becoz A+={A,B}, A is super key )

2) B → A   ⇒ BCNF (becoz B+={A,B}, B is super key )

3) A → B ,B → A  ⇒ BCNF (here A and B are super key )

4) NO non trivial dependency   ⇒ BCNF (becoz trivial FD's are always implied)

selected by
3 votes
3 votes
2 columns means 2 attributes.   A relation with 2 attributes  is always BCNF.  

Bcz for testing conditions  of BCNF says  that left hand side should be a candidate  key of every relation of the relational table .So this condition  will always  satisfy in this case.

And when bigger one satisfies  , we will never go for checking  smaller one . They will always satisfied.
1 votes
1 votes

IF RELATION CONSIST OF ONLY TWO COLUMNS(ATTRIBUTE) SAY P & Q THEN 'PQ' TOGETHER WILL HAVE DISTINCT VALUES FOR EACH TUPLE .

E.G

ROLL NO.(P) NAME (Q)
1 NIRAJ
2 NIRAJ
3 SURAJ

EVEN THOUGH COLUMN CAN HAVE DUPLICATES BUT TOGETHER THEY MUST BE UNIQUE.

I.E EITHER P->Q OR Q->P WILL MUST BE VALID (IN GIVEN EXAMPLE P->Q). WHICH SATISFY THE CONDITION OF BCNF THAT LEFT HAND SIDE SHOULD BE A SUPERKEY.

SINCE ONLY TWO NON TRIVIAL RELATIONS I.E P->Q AND Q->P ARE POSSIBLE WITH TWO ATTRIBUTE .OUT OF WHICH AT LEAST ONE WILL BE TRUE . HENCE RELATION WILL ALWAYS BE IN BCNF

Related questions

0 votes
0 votes
1 answer
2
phaniphani asked Nov 16, 2023
176 views
is it allowed in a B+ tree, while deletion to leave behind a key in internal nodes while deleting it from the leaf ?