Dr . Sameera Abu Ghalyoun Presentation - 2024 Functional dependency in Data base 4
functional dependency : is a key concept in database design, particularly in the context of normalization. It refers to a relationship between attributes in a database, where one attribute (or a set of attributes) determines another attribute (or a set of attributes). Functional Dependency Rules
Armstrong's axioms are a set of inference rules used to derive all the functional dependencies that are implied by a given set of functional dependencies. They are fundamental for reasoning about functional dependencies. Armstrong's Axioms
Armstrong's axioms include: Reflexivity: If Y⊆X , mean Y subset of X, then X→Y This means that any set of attributes functionally determines itself or any subset of itself. Given attributes X={A,B} and Y={A}, since Y⊆X , {A,B}→{A} holds by reflexivity. Armstrong's Axioms
2. Augmentation: If X→Y, then XZ→YZ, for any attribute set Z. Adding attributes to both sides of a functional dependency preserves the dependency. Example: Suppose X={A} and Y={B}, and the functional dependency A→B is given. If we augment both sides with Z={C}, we get AC→BC. Armstrong's Axioms
3 . Transitivity : If X→Y and Y→Z, then X→Z. This means that if X determines Y and Y determines Z, then X determines Z. Example: Let X={A} Y={B}, and Z={C} If we know A→B and B→C, then by transitivity, A→C holds. Armstrong's Axioms
Augmentation, reflexive And Transitive : These axioms can be used to derive other rules and to check if a particular functional dependency holds. Armstrong's Axioms
Using Armstrong’s Axioms To use Armstrong's axioms effectively, you can follow these steps: Identify the given functional dependencies. Apply the axioms to infer new dependencies. Verify if a dependency can be derived from the given ones using these rules. Understanding these concepts and rules is crucial for designing databases that are well-structured and normalized.
Here are examples for each of the Armstrong rules: 4. Union Rule: Rule : If X→Y and X→Z, then X→YZ. Example: Suppose X={A}, Y={B}, and Z={C}. If A→B and A→C, then A→{B,C} holds by union.
Here are examples for each of the Armstrong rules: 5. Decomposition Rule: Rule: If X→YZ, then X→Y and X→Z. Example : Given X={A}, Y={B}, and Z={C} If A→{B,C} ,then by decomposition, A→B and A→C.
Here are examples for each of the Armstrong rules: 6. Pseudotransitivity Rule: Rule: If X→Y and WY→Z, then WX→Z. Example: Let X={A}, Y={B}, W={C},and Z={D}. If A→B and {C,B}→D, then {C,A}→D holds by pseudotransitivity .
These examples illustrate how Armstrong's axioms can be used to infer new functional dependencies from existing ones.
For Your Attention Thank You Presentation - 2024 Dr . Sameera Abu Ghalyoun