FUNCTIONAL DEPENDENCY (FD)
It is an attribute or a set
of attribute that determines or implies the values of one or more attribute in
the relation. It’s an association between two or more attributes in a relation
or table.
For example: A -> B where
A is determinant attribute and B is determined attribute. Here, we can see that
there is an association between A and B in a table.
(C, A) -> B for composite
attribute C and A
FULLY FUNCTIONAL DEPENDENCY
(FFD)
The ‘determined’ attribute
cannot be determined by any sub-set of the ‘determinant’ attribute.
For example: (C, A) → then A ↛
B
PRIMARY FUNCTIONAL
DEPENDENCY (PFD)
A FD in which the ‘determinant’
attribute are the (primary) key attribute and the ‘determined’ attribute are
non-key attribute is called PDF.
For example: B ⟶ A where B is primary key.
TRANSITIVE FUNCTIONAL
DEPENDENCY (TDF)
A FD which may not directly
exist in the relation but can be inferred from the FDs that exist in the same
relation is referred to as TDF.
For example: A ⟶ B and B ⟶
C then A ⟶ C
DEPENDENCY DIAGRAM:
It’s a way of representing
FD with a diagram.
It is a pictorial
representation which indicates that which attribute in the relation determines
other attribute in the relation.
For example: A⟶ B, C⟶D, A⟶F, B⟶C
example 2:
WELL FORMED FORMULA (WFF)
Every query is translated into WFF; if successfully
translated then the formula is applied on the data and the result set is
generated.
HOW TO DETERMINE WHETHER THE QUERY IS WFF OR NOT?
- Every condition is a well formed formula.
- A WFF is constructed from conditions, Boolean operators (&&, !, ||) and quantifiers like ( for all, there exist).
- If F is a WFF them F’ (NOT F) is also a WFF.
- If F1 and F2 are two WFF then ‘F1 and F2’,’F1 or F2’ are also WFF.
- If F is a WFF in which t occurs as a free variable then t (F), t (F) are also WFF.
- Nothing else is WFF.
A general expression of the tuple relational calculus is
of the form:
F = {t1.A1, t2.A2,
…….. , tn.An\ condition (t1,t2,t3,…..
, tn)}
Where t1,
t2, …. , tn are tuple variables. Each Ai (i.e.
A1, A2, A3, ….) is an attribute of the
relation on which ti ranges and conditions is the formula of the tuple
relational calculus.
Comments
Post a Comment