• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/36

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

36 Cards in this Set

  • Front
  • Back
What is Normalization?
a step-by-step reversible process in which a set of given relations are replaced by successive collections of relations which have a progressively simpler and more regular structure.
Is information lost during transformations between normal forms?
No, because the normalization process is reversible.
What are the benefits of the Normalization Process?
- To make feasible to represent any relation in the database.
- To free relations from undesirable insertion, update, and deletion anomalies.
- To reduce the need for restructuring relations as new types of data are introduced.
What does BCNF stand for?
Boyce-Codd Normal Form
What level of normal form do databases behave reasonably?
3NF and BCNF
1 Normal Form Conditions are:
The intersection of a row and a column cannot have another relation or a set of values (repeating groups).
When do you transform a unnormalized table into 1NF?
Case No. 1- One of the attributes is also a table.

Case No. 2- There are one or more repeating groups in the unormalized table.
When is a attribute functionally dependent on another attribute?
if and only if each value of X is associated with exactly one value of Y in r.

X -> Y
X "functionally determines" Y
Algorithm to determine Functional Dependency:
Sort the relation on its X columns to bring tuples with equal X-values together.

If each set of tuples with equal X-values has equal Y-values, return true. Otherwise, return false.
What are Functional dependencies useful for?
determine partial and transitive dependencies

identify all possible candidate keys.
Given any key (primary or candidate) all other attributes must be functionally dependent on the key. (T/F)
True
What do Inference Axioms allow us to derive?
all functional dependencies that are satisfied by a relation r(R).
Reflexivity
If Y is a subset of X => X -> Y
Augmentation
If X --> Y
=> XZ --> Y
Additivity
If X --> Y
& X --> Z
=> X --> YZ
Projectivity
If X --> YZ
=> X --> Y
and
X --> Z
Transitivity
If X --> Y
& Y --> Z
=> X --> Z
Pseudotransitivity
If X --> Y
& YZ --> W
=> XZ --> W
What are the basis of Armstrong’s axioms?
Complete:
That is, ALL valid FDs that can be derived from a given set of FDs can de derived by means of the axioms.

Sound:
The axioms cannot derive FDs that are not valid.
prime attribute
Any attribute that belongs to any key (candidate or primary)
nonprime attribute
Any attribute that does not belongs to any key (candidate and primary)
determinant
left hand side of any functional dependency
an attribute is partially dependant on key if...
X if there is a proper subset of attributes W of X such that W --> Y

in addition of being dependent on the entire key a partially dependent attribute is functionally dependent on some other attribute of the key.
What does it mean to be fully dependent on the key
If an attribute Y is functionally dependent on the key X but not in any attribute W -that is part of the key- the attribute Y is said to be fully dependent on the key X
Do anomalies occur in 1NF relations?
yes, anomalies occur because there are nonprime attributes that are partially dependent on the key.
Conditions for Second Normal Form (2NF):
The relation r is already in 1NF.

No nonprime attribute is partially dependent upon any composite key of the relation. That is, all nonprime attributes must be totally dependent upon every key.
Implications of the definition of 2NF:
A relation with one-attribute primary key is automatically in 2NF.

A relation in which all its attributes are prime is automatically in 2NF.
How to determine if a relation is in 2NF
1.- Check that the relation is already in 1NF.

2.- Find ALL possible keys of the relation to determine all prime attributes.

3 Find ALL prime and nonprime attributes

4.- Show that ALL nonprime attributes are fully dependent upon any key.
Heath's Theorem
"Let R(A,B,C) be a relation where A, B, and C are set of attributes. If the relation R satisfies A→ B, then R is equal to the join of its projections on (A,B) and (A,C)."
What anomalies are solved by moving from 1NF to 2NF?
Insertion, deletion, and update
What are the anomalies in 2NF?
to transitive dependencies of nonprime attributes upon any key.
When does a transitive dependency occur?
A transitive dependency occurs when a non prime attribute determines another non prime attribute.
Conditions for 3NF:
The relation r is already in 2NF.

No nonprime attribute is functionally dependent upon any other nonprime attribute of the relation.
How to determine if a relation is in 3NF
Check that the relation is already in 2NF.

Show that all nonprime attributes are independent.
Conditions for Boyce-Codd Normal Form (BCNF)
The relation r(R) is already in 1NF.

For every set of attributes C of R, if any attribute not in C is functionally dependent on C, then each and every attribute in r(R) is functionally dependent on C.
It may not be convenient to transform a relation to BCNF if:
The functional dependencies are not preserved

The candidate keys have overlapping attributes

it may slow down the performance of the database due to its high number of tables and the join operations