Title: Functional Dependency Application
Author: David J. Stein, Esq., Kevin Hardy, and Craig White
Version: 1.0
Written: Fall 2004
Abstract: This application facilitates the development of attribute and functional dependency sets in a relational database. The application tests for form normalization (second, third, and Boyce-Codd normal forms) and checks for minimality and nonredundancy. The application can also determine whether a designated set of attributes is a key for the attribute set, and the attributes that the set directly derives.
Installation Instructions: Nothing unusual - simply run the enclosed executable.
Operation Instructions: Upon execution, the application displays the main user interface form, which shows the current attribute set and the current functional dependency set (over the current attribute set.) Both sets are initially empty, so the user may create new attributes and functional dependencies through this form. Adding an attribute is done simply by clicking "Create Attribute" and specifying its name.
To create a functional dependency, click the "Add Functional Dependency," which produces a form containing two lists of attributes, one for the left-hand side and one for the right-hand side of the new functional dependency. Select the attributes that should appear on each side of the functional dependency and click OK. The new attribute or functional dependency is then shown on the lists in the main form. The user may edit any item by double-clicking on its entry in these lists, or may delete it by clicking on the item and then clicking either the "Delete Attribute" or "Delete Functional Dependency" button.
Once an attribute set and functional dependency set have been created, the following operations are available for them:
- Find All Keys: This finds all keys in the current attribute set over the current functional dependency set. The results dialog displays both a list of keys and a separate list of superkeys.
- Test Attribute Set as Key: This allows the user to choose a subset of the current attribute set and will test whether it is a key, superkey, or neither. Clicking this button presents the user with a new form, containing a list of all known attributes and a list of known attribute sets saved to disk. You may click on attributes in the known attributes list to select a subset, or you may double-click on the name of any saved attribute set to specify it as the subset for the current set. Clicking "Test Selected Attributes" will then test all selected attributes and will report one of three results:
- "Attribute set A B C is a key."
- "Attribute set A B C is a superkey. Unnecessary attributes: B C"
- "Attribute set A B C is not a key. Does not determine the following attributes: D E F"
- Find Lin Closure: This option finds the full set of attributes determined by any subset of attributes, by means of the LinClosure function. Clicking this button presents a new form, similar to the "Test Attribute Set As Key" form, allowing the user to select a subset of attributes or load a subset previously saved to disk. Clicking "Find Lin Closure of Selected Attributes" displays the results in the two lists at the bottom of the form - one for the attribute set chosen, and the other for the attributes that the selected attribute set determines.
- Test 2NF Status: This determines whether or not the functional dependency set meets the test for second normal form. If not, the non-prime attributes that raise partial dependency problems are
displayed.
- Test 3NF Status: This determines whether or not the functional dependency set meets the test for third normal form. If not, the non-prime attributes that raise transitive dependency problems are displayed.
- Test BCNF Status: This determines whether or not the functional dependency set meets the test for Boyce-Codd normal form. If not, the functional dependencies that raise transitive problems are displayed.
- Test Nonredundancy: This determines whether any functional dependencies in the functional dependency set are redundant. If so, the redundant functional dependencies are displayed, and the user is given the option of preserving them or excluding them from the current functional
dependency set.
- Test Direct Derivation: This determines whether any set of attributes directly derives any other set of attributes. The user may select sets of attributes for the left-hand and right-hand sides of the direct derivation, or may select any of the current functional dependencies in the
functional dependency set.
- Minimize: This determines the minimum functional dependency set that is equivalent to the current functional dependency set. If the minimum set is not identical to the current functional dependency set, application asks whether to keep the original set or accepting the newly computed minimum set as the new functional dependency set.
Application History: This application was written for a relational database theory course taught by Dr. David McIntyre in Fall, 2004. This assignment was written in Visual Basic.NET with the assistance of Kevin Hardy and Craig White, and has been made available here under the included license with their consent.
Questions/Comments:
Please contact David J. Stein, Esq. via email at djs10@po.cwru.edu.
Terms and Conditions of Use:
Please see the enclosed "License.html" file for terms and conditions of use of this software package.