How can you find the minimal key of relational schema?
Submitted by: AdministratorMinimal key is one which can identify each tuple of the given relation schema uniquely. For finding the minimal key it is required to find the closure that is the set of all attributes that are dependent on any given set of attributes under the given set of functional dependency.
Algo. I Determining X+, closure for X, given set of FDs F
1. Set X+ = X
2. Set Old X+ = X+
3. For each FD Y Z in F and if Y belongs to X+ then add Z to X+
4. Repeat steps 2 and 3 until Old X+ = X+
Algo.II Determining minimal K for relation schema R, given set of FDs F
1. Set K to R that is make K a set of all attributes in R
2. For each attribute A in K
a. Compute (K - A)+ with respect to F
b. If (K - A)+ = R then set K = (K - A)+
Submitted by: Administrator
Algo. I Determining X+, closure for X, given set of FDs F
1. Set X+ = X
2. Set Old X+ = X+
3. For each FD Y Z in F and if Y belongs to X+ then add Z to X+
4. Repeat steps 2 and 3 until Old X+ = X+
Algo.II Determining minimal K for relation schema R, given set of FDs F
1. Set K to R that is make K a set of all attributes in R
2. For each attribute A in K
a. Compute (K - A)+ with respect to F
b. If (K - A)+ = R then set K = (K - A)+
Submitted by: Administrator
Read Online RDBMS Job Interview Questions And Answers
Top RDBMS Questions
☺ | What is VDL (View Definition Language)? |
☺ | Difference between controlled and uncontrolled redundancy? |
☺ | What is RDBMS KERNEL? |
☺ | What is SDL (Storage Definition Language)? |
☺ | What is 5NF? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |
☺ | Sybase Interview Questions. |