Home >> MySql >> What is candidate key in MySql

What is candidate key in MySql

A candidate key is a minimal super key and proper subset of it can not be able to identify each row uniquely(proper subset of it is no longer a super key).

Example 1 Find no. of candidate key

R(A,B,C,D)

A->BC

CD->E

B->D

E->A

Ans

A->ABC

A->ABCD(B->D)

A->ABCDE(E->A)

E->ABCDE

CD->ABCDE

BC->ABCDE

Total no. of candidate key=4

 

 

Post Your Comment

Next Questions
What is primary key
What is unique key
What is foreign key
What is join
What is cross join
What is natural join
What is outer join
What is self join
What is aggregate function
COUNT(*) aggregate function
AVG() aggregate function
MIN() aggregate function
MAX() aggregate function
SUM() aggregate function
STDED() aggregate function
CONCAT() function
GROUP_CONCAT() function
CONCAT_WS() function
CHECKSUM_AGG() aggregate function
ABS(n) aggregate function
POWER(m,n) aggregate function
ROUND() aggregate function
SQRT() aggregate function
GREATEST() aggregate function
LEAST() aggregate function

Copyright ©2022 coderraj.com. All Rights Reserved.