# Equivalence of Functional Dependencies | DBMS

In this tutorial, we are going to learn about the **equivalence of functional dependencies in database management system**.

Submitted by Anushree Goswami, on September 01, 2019

**Equivalence of Functional dependencies** states that, if the relations of different Functional dependencies sets are given, then we have to find out whether one Functional dependency set is a subset of other given set or both the sets are equal.

To find out whether one Functional dependency set is a subset of other given set or both the sets are equal.

Suppose **R1** and **R2** are two Functional dependencies sets for a relation **R**.

- If all Functional dependencies of R1 can be derived from Functional dependencies present in
**R2**, we can say that**R2**is a subset of**R1 (R2 ⊃ R1)**. - If all Functional dependencies of R2 can be derived from Functional dependencies present in
**R1**, we can say that**R1**is a subset of**R2 (R1 ⊃ R2)**. - If
**1**and**2**both are satisfied, then**R1 = R2**.

### Case 1) Determining Whether R2 ⊃ R1 or not

Steps are followed to determine whether R2 is a subset of R1 (R2 ⊃ R1) or not,

**Step 1)**

- Take into consideration, the functional dependencies of set R1.
- For every functional dependency P→ Q, find by using the functional dependencies of set R1, the closure of P.

**Step 2)**

- Take into consideration, the functional dependencies of set R2.
- For every functional dependency P→ Q, find by using the functional dependencies of set R2, the closure of P.

**Step 3)**

- Compare the results of Step 1 and Step 2.
- If the functional dependency of set R2 has determined all those attributes that were determined by the functional dependencies of set R1, then it means R2 ⊃ R1.
- Thus, we conclude R2 is a subset of R1 (R2 ⊃ R1) otherwise not.

### Case 2) Determining Whether R1 ⊃ R2 or not

Steps are followed to determine whether R1 is a subset of R2 (R1 ⊃ R2),

**Step 1)**

- Take into consideration the functional dependencies of set R2.
- For every functional dependency P → Q, find by using the functional dependencies of set R2, the closure of P.

**Step 2)**

- Take into consideration the functional dependencies of set R1.
- For every functional dependency P → Q, find by using the functional dependencies of set R1, the closure of P.

**Step 3)**

- Compare the results of Step 1 and Step 2.
- If the functional dependency of set R1 has determined all those attributes that were determined by the functional dependencies of set R2, then it means R1 ⊃ R2.
- Thus, we conclude that R1 is a subset of R2 (R1 ⊃ R2) otherwise not.

### Case 3) Determining Whether Both R1 and R2 satisfy each other or not

- If R2 is a subset of R1 and R1 is a subset of R2, then both R1 and R2 satisfied each other.
- Thus, if both the above cases satisfied, we conclude that R1 = R2.

## Example based on Equivalence of Functional Dependencies

**Q)** A relation R (P, Q, U, S, and T) is having two functional dependencies sets R1 and R2, which is shown as

Set R1: Set R2: P → C P → QU PQ → U S → PT S → T

**Solution...**

**Case 1) Determining Whether R2 ⊃ R1 or not**

**Step 1)**

- (P)+ = {P, Q, U} // closure of left side of P → QU using set R1.
- (S)+ = {P, Q, U, S, T} // closure of left side of S → PT using set R1.

**Step 2)**

- (P)+ = {P, Q, U} // closure of left side of P → QU using set R2.
- (S)+ = {P, Q, U, S, T} // closure of left side of S → PT using set R2.

**Step 3)**

Comparing the results of Step 1 and Step 2, we find,

- Functional dependencies of set R2 can determine all the attributes which have been determined by the functional dependencies of set R1.
- Thus, we conclude R2 is a subset of R1 i.e. R2 ⊃ R1.

**Case 2) Determining Whether R1 ⊃ R2 or not**

**Step 1)**

- (P)
^{+}= {P, Q, U} // closure of left side of P→ Q using set R2. - (PQ)
^{+}= {P, Q, U} // closure of left side of PQ → U using set R2. - (S)
^{+}= {P, Q, U, S, T} // closure of left side of S → PU and S → T using set R2.

**Step 2)**

- (P)
^{+}= {P, Q, U} // closure of left side of P→ Q using set R1. - (PQ)
^{+}= {P, Q, U} // closure of left side of PQ → U using set R1. - (S)
^{+}= {P, Q, U, S, T} // closure of left side of S → PU and S → T using set R1.

**Step 3)**

Comparing the results of Step 1 and Step 2, we find,

- Functional dependencies of set R1 can determine all the attributes which have been determined by the functional dependencies of set R2.
- Thus, we conclude R1 is a subset of R2 i.e. R1 ⊃ R2.

**Case 3) Determining Whether Both R1 and R2 satisfy each other or not**

- From Step 1, we conclude R2 ⊃ R1.
- From Step 2, we conclude R1 ⊃ R2.
- Thus, we conclude that both R1 and R2 satisfied each other i.e. R1 = R2.

Related Tutorials

- Basic Terminologies/terms used in DBMS
- Introduction of Database Management system
- Users, Applications, Advantages and Disadvantages of DBMS
- When Not to Use a DBMS?
- Types of Database Management System
- File Oriented and Database Approach in DBMS
- Difference between DBMS and Traditional File System
- Views in Database Management System (DBMS)
- Architecture of Database Management System
- Instances and Schemas in DBMS
- Different types of Data Model in DBMS
- Drawbacks of Data Models and Architecture of Data Model
- Database Languages in DBMS
- Data Manipulation in a Network Database
- Data Definition and Integrity Constraints in Hierarchal Database Model
- Data Dictionary in DBMS
- Database Administrators (DBA) in DBMS
- Database Users and User Interfaces in DBMS
- Differences between DBMS and RDBMS?
- Introduction of ER Diagram/ER Modelling
- Conversion of ER Diagram to Relational Model
- Differences between SQL Vs NoSQL
- Aggregate Operators, GROUP BY and HAVING clause in DBMS
- Nested Queries, Correlated Nested Queries and Set Comparison Operators in DBMS
- Functional Dependency and Attribute Closure in DBMS
- Closure set of attribute and irreducible set of functional dependency
- 12 Golden Rules of EF-Codd | DBMS
- Relational Algebra in DBMS
- DBMS | Basic Operators in Relational Algebra
- DBMS | Extended Operators in Relational Algebra
- Basic and additional operations of Relational Algebra
- Relational Calculus in DBMS
- SQL Joins Tutorial with Queries and Examples
- Inner Join vs Outer Join in DBMS
- Transaction in Database Management System
- Commit Point of Transaction | DBMS
- Keys in Database Management System (DBMS)
- Normalization in Database Management System
- What is Chomsky Normal Form?
- What is PJNF (Project-Join Normal Form)?

- What is the difference between 1NF and 2NF in DBMS?
- What is the difference between 1NF and 3NF in DBMS?
- DBMS | File Organization
- Design Decision about Indexing | DBMS
- Log based Recovery in Database Management System
- Buffering of Blocks | DBMS
- Classification of Schedules in DBMS
- Locking protocols and its types in DBMS
- Query Optimization, Recovery of transaction and Multiple Granularity | DBMS
- Concurrency and problem due to concurrency in DBMS
- DBMS | Concurrency Control
- DBMS | Concurrency Control and Various methods of concurrency control
- Lossless Decomposition in DBMS
- DBMS | Data Replication and its Types
- DBMS | Data Replication Schemes, Advantages and Disadvantages of Data Replication
- Redundancy Issues in a Database in DBMS
- Denormalization in Database | DBMS
- Tuple Relational Calculus | DBMS
- Row oriented vs Column oriented Data stores | DBMS
- Join operation vs nested query | DBMS
- Armstrong's Axioms in Functional Dependency | DBMS
- Dependency preserving decomposition | DBMS
- Domain-key normal form | DBMS
- Fourth Normal Form (4NF) | DBMS
- Fifth Normal Form (5NF) | DBMS
- How to find the highest normal form of a relation in DBMS?
- Thomas Write Rule in DBMS
- Timestamp ordering protocol | DBMS
- Precedence Graph | DBMS
- Database Recovery Techniques | DBMS

What's New

- C Language MCQs
- Python MCQs
- Perl MCQs
- MongoDB MCQs
- Java MCQs
- C# MCQs
- Scala MCQs
- Blockchain MCQs
- AutoCAD MCQs
- PHP MCQs
- JavaScript MCQs
- jQuery MCQs
- ReactJS MCQs
- AngularJS MCQs
- JSON MCQs
- Ajax MCQs
- SASS MCQs
- HTML MCQs
- Advanced CSS MCQs
- CSS MCQs
- OOPs MCQs
- PL/SQL MCQs
- SQL MCQs
- Oracle MCQs
- SQLite MCQs
- MS Word MCQs
- Software Engineering MCQs
- Operating System MCQs
- Data Analytics and Visualization MCQs
- MIS MCQs
- Linux MCQs
- WordPress MCQs
- Blogging MCQs

- Energy & Environment Engineering MCQs
- Project Management MCQs
- Marketing MCQs
- Generally Accepted Accounting Principles MCQs
- Bills of Exchange MCQs
- Business Environment MCQs
- Sustainable Development MCQs
- Marginal Costing and Absorption Costing MCQs
- Globalisation MCQs
- Indian Economy MCQs
- Retained Earnings MCQs
- Depreciation MCQs
- Partnership MCQs
- Sole Proprietorship MCQs
- Goods and Services Tax (GST) MCQs
- Cooperative Society MCQs
- Capital Market MCQs
- Business Studies MCQs
- Basic Accounting MCQs
- MIS Executive Interview Questions
- Go Language Interview Questions

Top Interview Coding Problems/Challenges!

- Run-length encoding (find/print frequency of letters in a string)
- Sort an array of 0's, 1's and 2's in linear time complexity
- Checking Anagrams (check whether two string is anagrams or not)
- Relative sorting algorithm
- Finding subarray with given sum
- Find the level in a binary tree with given sum K
- Check whether a Binary Tree is BST (Binary Search Tree) or not
- 1[0]1 Pattern Count
- Capitalize first and last letter of each word in a line
- Print vertical sum of a binary tree
- Print Boundary Sum of a Binary Tree
- Reverse a single linked list
- Greedy Strategy to solve major algorithm problems
- Job sequencing problem
- Root to leaf Path Sum
- Exit Point in a Matrix
- Find length of loop in a linked list
- Toppers of Class
- Print All Nodes that don't have Sibling
- Transform to Sum Tree
- Shortest Source to Destination Path

Comments and Discussions!