Help
Use of the application
To use this application, follows the steps detailed below:
- Define a relation schema, i.e. a set of attributes and a set of functional dependencies.
(See the section Syntax of the input data for the syntax accepted. See the section: Limitations for limits on input data).
- Check for the correctness of the syntax by clicking on the "Syntax check" button.
- Select the operation desired through one of the buttons of the
section Select a simple operation or Select an advanced operation. The operation will be performed immediately, or it will require additional input. The operations requiring additional content are distinguished by the ellipsis after their name.
- Click on the control Show explanations when available if you
want a detailed report of the steps executed by the algorithm. This
is available only for certain advanced operations.
- If the operation requires the input of additional data, enter them in the section Input additional data, and press the button of the section Execute the
operation. If you change your mind about the operation before requesting its
execution, you can chose another operation, and the system will try
to maintain as much as possibile the data inserted.
- The result will appear inside the Result section.
When a different operation is chosen, the input data are preserved as
much as possible, and the previous result is not canceled until the new operation is called.
In order to allow the pasting of data into the required fields from
different sources and textbooks, as well as from the output of a
previous operation, the application is quite tolerant
about the syntax used. In particular:
- Attributes You can insert attributes separating them either by
spaces, commas, or by other non alphanumeric characters. The following
are valid specifications of attributes:
- A B
- (FkInvoice, InvoiceLineNo)
- a b
c - d -e
- Località, 属性, атрибут
Finally, note that, due to the tolerance on the syntax and the fact that duplicate attributes are
automatically eliminated, you can paste in this field a set of functional dependencies and the system will find
automatically all the attributes of the relation.
- Dependencies The syntax for them, anologously to attributes,
allows a liberal use of non alphanumeric characters like comma or parenthesis. The only
two real requirements are the followings:
- Each dependency must be on a single line.
- The determinant and the determinate must be separated by the
couple of characters '->' (dash and greater than, contiguous), or
the single character '→' (rightwards arrow, Unicode U+2192).
Example of dependencies:
- a b -> c d
- (a,b)->(c,d)
- a --> b
- {(a, b) → (c, d),
(a) → (e, b)}>
- -> a b
- c ->
Note that last two examples of valid dependencies.
A dependency with an empty determinant describes attributes
with a constant value, while a dependency with an empty right part is trivial since it is always true.
Finally, note that AB -> C is interpreted as: the attribute AB
determines the attribute C, and not: the attributes A and B
determine the attribute C, since there are no characters separating
A and B.
- Decompositions Only the attributes of the different decompositions can be
written. Each group of attributes related to a decomposed relation must be enclosed in parentheses,
and the attributes must be separated by non alphanumeric characters, like spaces or commas.
Example of decomposition:
(A, B, C)
(A D E)
Syntactic abbreviation for mutually determined attributes
sets
There is a notation which simplifies the writing of two dependencies in
which the determinant and the determinate exchange their role, like
in a -> b and b -> a. This couple of dependencies can be written in a
unique line as a<->b or a↔b, by using <-> (the three characters less-then dash greater-then,
countiguous), or ↔ (the single character left right arrow, Unicode
U+2194).
Operations
Simple Operations
- Normalize A fully automated normalization is execute with the following steps:
- A canonical cover of the dependencies is found.
- All the keys of the relation schema are found.
- The schema is checked for BCNF. If it is already in this normal form, the execution is terminated.
- The schema is checked for 3NF. If it is already in this normal form, the execution is terminated.
- A decomposition in BCNF is attempted with the analysis algorithm. If at least a dependency is lost,
the decomposition is discarded, otherwise the execution is terminated.
- A decomposition in 3NF with the synthesis algorithm is executed, and the resulting relations are
checked to see if they satisfy also the BCNF.
- Check decomposition The user must insert a decomposition.
The system analyses it to find if:
- is correct (contains only the attributes of R and all of them),
- is redundant (containes schemas of relations contained in others),
- is lossless (nonadditive),
- preserves the dependencies.
Finally, for each decomposed relation, the maximum (up to BCNF) normal form of the relation is printed,
togheter with a cover of the projection of the dependencies over the relation.
Advanced Operations
- Attribute set closure To find the closure of a set of attributes with
respect to the dependencies of a relational schema. The additional input are the attributes
over which the closure must be done.
- Projection of dependency set To find a canonical form of the
projection of the dependencies of a relational schema over a set of attributes. The additional
input are the attributes over which the projection must be computed.
- Logical implication To test if a set of functional dependencies is
logically implied by the dependencies of a relational schema. The additional input are the
functional dependencies of the second set.
- Equivalence To test if a set of functional dependencies is equivalent the
functional dependencies of a relational schema.
The additional input are the functional dependencies of the second set.
- Canonicalize To find a canonical cover of the set of functional dependencies of a
relational schema. Note that the output of the command depend on the
order in which the dependencies are specified.
- Find keysTo find all the keys of a relational schema.
- Find prime attributes To find all the attributes that appears in at least one candidate key
of a relational schema.
- Test BCNF To test if a relational schema is in Boyce-Codd Normal
Form.
- Find BCNF To find a lossless decomposition of a relational schema into the Boyce-Codd Normal
Form. The
result may be not dependency-preserving,
- Find BCNF step by step This operation is a variant of the previous one that allows the user
to select the first functional dependency that must be eliminated by
the system when there are multiple dependencies that violate the Boyce-Codd Normal
Form.
- Test 3NF To test if a relational schema is in Third Normal Form.
- Find 3NF To find a dependency-preserving and lossless decomposition of a
relational schema into Third Normal Form through the synthesis algorithm. Note that the operation
may decompose a relation even if it is already in Third Normal Form; however, the decomposition is still
guaranteed to be in Third Normal Form.
- Find 3NF with projection of dependencies This operation is a variant of
the previous one to find also a canonical form of projection of the dependencies for each schema obtained.
- Find 3NF with test for BCNF After decomposing in Third Normal Form, the resulting
relations are checked to see which of them is also in Boyce-Codd Normal Form.
This application has two main limitations:
- You can insert at most 20000 characters in each field.
- The number of attributes of a relation is restricted only by the total size of the field as specified in
the previous limit, but, if this number is greater than 50, then any operation marked in red
in the interface will not be performed. This is due to the fact that the complexity of their algorithm is,
in the worst case, esponential.