Minimal and Canononical Cover
Minimal and Canononical Cover
CANONICAL FORM:
Canonical form in DBMS refers to the standardized representation of
functional dependencies (FDs). Specifically, every FD in the canonical form
has a single attribute on the right-hand side (RHS), and no FD is
redundant or contains any extraneous attributes. Here are some problems
involving the conversion to and use of canonical forms.
1. Convert a Set of FDs to Canonical Form
Problem:
Given the following set of functional dependencies, convert them into
canonical form:
F = { A → BC, B → CD, A → D }.
Solution:
1. Split each FD with multiple attributes on the RHS:
o A → BC becomes A → B, A → C.
o B → CD becomes B → C, B → D.
The canonical form:
o Canonical form: { A → B, A → C, B → C, B → D, A → D }.
2. Determine if a Given Set of FDs is in Canonical Form
Problem:
Determine if the following set of functional dependencies is in canonical
form:
F = { A → B, AB → C, C → DE }.
Solution:
1. Check if each FD has a single attribute on the RHS:
o A → B: Single attribute on the RHS, no need to split.
o AB → C: Single attribute on the RHS, no need to split.
o C → DE: Multiple attributes on the RHS, need to split into:
C → D, C → E.
2. The new set in canonical form:
o Canonical form: { A → B, AB → C, C → D, C → E }.
3. Convert FDs to Canonical Form and Find Closure
Problem:
Given FDs: F = { A → B, B → CD, D → E }, convert them to canonical form
and find the closure of { A }.
Solution:
1. Convert to canonical form:
o B → CD becomes B → C, B → D.
Canonical form: { A → B, B → C, B → D, D → E }.
2. Find the closure of { A }:
o A⁺ = { A }.
o Using A → B, A⁺ = { A, B }.
o Using B → C, A⁺ = { A, B, C }.
o Using B → D, A⁺ = { A, B, C, D }.
o Using D → E, A⁺ = { A, B, C, D, E }.
Closure of { A } = { A, B, C, D, E }.
Problem:
Consider a set of Functional dependencies: 𝐹={𝐴→𝐵𝐶,𝐵→𝐶,𝐴𝐵→𝐶}.
Here are the steps to find the canonical cover –
Step 1:Decompose FDs to have a single attribute on the right-hand side
𝐴→𝐵𝐶 becomes 𝐴→𝐵 and 𝐴→𝐶.
Therefore, we have {𝐴→𝐵, 𝐴→𝐶, 𝐵→𝐶, 𝐴𝐵→𝐶}.
Step 2:Remove extraneous attributes from the left-hand side of FDs
Checking 𝐴𝐵→𝐶: First, check if 𝐴 or 𝐵 is extraneous.
We can reach 𝐶 without using 𝐴𝐵→𝐶 with other functional
dependencies; therefore, we remove 𝐴𝐵→𝐶.
without using it. For example, 𝐴→𝐶 can be reached with 𝐴→𝐵 and
Check each functional dependency to see if it can be reached