Attribute Closure

Attribute closure of an attribute set can be defined as set of attributes which can be functionally determined from it. 

How to find attribute closure of an attribute set?

To find attribute closure of an attribute set: 

  • Add elements of attribute set to the result set.
  • Recursively add elements to the result set which can be functionally determined from the elements of the result set.

Using FD set of table 1, attribute closure can be determined as: 

(STUD_NO)+ = {STUD_NO, STUD_NAME, STUD_PHONE, STUD_STATE, STUD_COUNTRY, STUD_AGE}
(STUD_STATE)+ = {STUD_STATE, STUD_COUNTRY}

Advantages of Attribute Closure

  • Attribute closures help to identify all possible attributes that can be derived from a set of given attributes.
  • They facilitate database design by identifying relationships between attributes and tables, which can help to optimize query performance.
  • They ensure data consistency by identifying all possible combinations of attributes that can exist in the database.

Disadvantages of Attribute Closure

  • The process of calculating attribute closures can be computationally expensive, especially for large datasets.
  • Attribute closures can become too complex to manage, especially as the number of attributes and tables in a database grows.
  • Attribute closures do not take into account the semantic meaning of data, and may not always accurately reflect the relationships between data elements.

Functional Dependency and Attribute Closure

Fundamental ideas in database management and design are functional dependency and attribute closure. They are essential to maintaining data integrity and building effective, organized, and normalized databases.

Similar Reads

Functional Dependency

A functional dependency A->B in a relation holds if two tuples having the same value of attribute A also have the same value for attribute B. For Example, in relation to STUDENT shown in Table 1, Functional Dependencies...

How to find Functional Dependencies for a Relation?

Functional Dependencies in a relation are dependent on the domain of the relation. Consider the STUDENT relation given in Table 1....

Attribute Closure

Attribute closure of an attribute set can be defined as set of attributes which can be functionally determined from it....

How to Find Candidate Keys and Super Keys Using Attribute Closure?

If attribute closure of an attribute set contains all attributes of relation, the attribute set will be super key of the relation. If no subset of this attribute set can functionally determine all attributes of the relation, the set will be candidate key as well. For Example, using FD set of table 1,...

Prime and Non-Prime Attributes

Attributes which are parts of any candidate key of relation are called as prime attribute, others are non-prime attributes. For Example, STUD_NO in STUDENT relation is prime attribute, others are non-prime attribute....

Conclusion

Tools like functional dependency and attribute closure are helpful when designing and optimizing databases. They are useful for:...

GATE Questions

Q.1: Consider the relation scheme R = {E, F, G, H, I, J, K, L, M, N} and the set of functional dependencies {{E, F} -> {G}, {F} -> {I, J}, {E, H} -> {K, L}, K -> {M}, L -> {N} on R. What is the key for R? (GATE-CS-2014)...