Chapter 14 Flashcards
______________ are used to specify formal measures of the “goodness” of relational designs, and are constraints that are derived from the meaning and interrelationships of the data attributes
Functional Dependencies (FDs)
______ are used to define normal forms for relations.
keys
Write the FD constraint of the following:
Social security number determines employee name.
SSN → ENAME
Write the FD constraint of the following:
Employee ssn and project number determines the hours per week that the employee works on the project
{SSN, PNUMBER} → HOURS
T/F: The FD constraint must hold on every relation instance r(R).
True.
T/F: If K is a key of schema R, then R functionally determines all attributes in K.
F, K funcitonally determines all attributes in K.
T/F: Given an instance (population) of a relation, all we can conclude is that an FD MAY exist between certain attributes.
true.
What we can definitely conclude is – that certain FDs do not exist because there are tuples that show a violation of those dependencies.
Find the FDs that may exist in the following:
Find the FDs that may exist in the following:
____________ is the process of decomposing unsatisfactory “bad” relations by breaking up their attributes into smaller relations.
Normalization
__________ is a condition using keys and FDs of a relation to certify whether a relation schema is in a particular normal form.
Normal Form
_____________ is the process of storing the join of higher normal form relations as a base relation—which is in a lower normal form.
Denormalization
________ is a normal form based on keys, join dependencies (JDs)
5NF
________ is a normal form based on keys, multi-valued dependencies (MVDS).
4NF
_______, ________, and ________ are normal forms based on keys and FDs of a relation schema.
2NF, 3NF, BCNF
T/F: The database designers need to normalize to the highest possible normal form.
false, they do not.
usually up to 3NF and BCNF. 4NF rarely used in practice.
A _________ of a relation schema R = {A1, A2, …., An} is a set of attributes S subset-of R with the property that no two tuples t1 and t2 in any legal relation state r of R will have t1[S] = t2[S] .
Superkey
A ________ is a superkey with the additional property that removal of any attribute from K will cause K not to be a superkey any more.
Key K
If a relation schema has more than one key, each is called a _____________.
candidate key
T/F: One of the candidate keys is arbitrarily designated to be the primary key, and the others are called secondary keys.
True.
T/F: A Prime attribute must be a member of some candidate key.
true
A __________ is not a prime attribute—that is, it is not a member of any candidate key.
nonprime attribute
The First Normal form disallows ________ attributes, ___________ attributes, and nested relations; attributes whose values for an individual tuple are non-atomic.
composite. multivalued.
Normalize the following into 1NF:
Normalize the following:
we decomposed the nested relation EMP_PROJC into two relations EMP_PROJ1 and EMP_PROJ2 by propagating the primary key.
________ is an attribute that is member of the primary key K.
prime attribute
______________ is when an FD Y -> Z where removal of any attribute from Y means the FD does not hold any more.
Full functional dependency
Is the following a full FD? or not?
{SSN, PNUMBER} -> ENAME
it is not a full FD (it is called a
partial dependency ) since SSN -> ENAME also holds
Is the following a full FD or not?
{SSN, PNUMBER} -> HOURS
it is a full FD since neither SSN -> HOURS nor PNUMBER -> HOURS hold
A relation schema R is in second normal form (2NF) if every non-prime attribute A in R is fully functionally dependent on the __________.
primary key