normalization Flashcards

(33 cards)

1
Q

the ER model provided a common language between

A

users and models that could be directly converted into a database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

t/f: all database tables qualify as relations

A

false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

normalization is the solution to

A

redundancy and anomalies, requirements for relations are too generic to take care of these problems

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

3 types of anomalies

A

update, insertion, deletion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

normalization

A

process for evaluating and correcting table structures to minimize data redundancies by decomposing relations with anomalies to produce smaller, well-structured relations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

normalization is a check against

A

potential mistakes/inefficiencies that might be in structure of database tables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

well-structured relations

A

contains minimal data redundancy and allows users to insert, delete, and update rows without causing data inconsistencies

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

insertion anomaly

A

adding new rows forces user to create duplicate data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

deletion anomaly

A

deleting rows may cause a loss of data that would be needed for other future rows

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

modification (update) anomaly

A

changing data in a row forces changes to other rows because of duplication

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

general rule of thumb for well structured relations

A

table should not pertain to more than one entity type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

if A and B are two sets of attributes of a relation R, then:

A

B is functionally dependent on A if each value of A in the relation is associated with exactly one value of B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

functional dependency is represented by

A

A -> B

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

first letter in functional dependency is called

A

determinant

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

any relation that does not have multi-valued attributes is in

A

First Normal Form (1NF)
- aka atomic

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

by definition, any valid relation is in

17
Q

starting normalization process:

A
  1. eliminate repeating groups (multi-valued attributes)
  2. identify primary key
  3. identify all dependencies
18
Q

a relation is in second normal form or 2NF if

A

it is in first normal form, and every non-key attribute is fully functionally dependent on the primary key

19
Q

fully dependent implies

A

no partial functional dependencies, i.e. no non-key attributes are functionally dependent on only part of the primary key

20
Q

converting to 2NF, you start with

A

a relation in 1NF

21
Q

converting to 2NF steps after start

A
  1. make new tables to eliminate partial dependencies
  2. reassign the corresponding dependent attributes
22
Q

2NF: make new tables to eliminate partial dependencies

A
  • a new table is needed for each component of the primary key that is a determinant in a partial dependency
  • the original (composite) primary key should remain in the original table
23
Q

2NF: reassign the corresponding dependent attributes

A
  • remove dependent attributes from the original table and move them to the corresponding new table
24
Q

any relation in 1NF that has a single-attribute primary key is

A

automatically in 2NF

25
a relation is in third normal form (3NF) if it is
in 2NF and it contains no transitive dependencies
26
converting to 3NF
1. make new tables to eliminate transitive dependencies 2. reassign corresponding dependent attributes
27
3NF: make new tables to eliminate transitive dependencies
the determinant of each transitive dependency becomes the primary key of its own new table
28
3NF: reassign corresponding dependent attributes
remove dependent attributes from the original table and move them to the corresponding new table
29
a table is in Boyce-Codd normal form, or BCNF, if
every determinant in the table is a candidate key
30
example of BCNF
non-key attribute is the determinant of a key attribute
31
relations in a well designed database meet the following criteria
- little or no redundancy - no partial dependencies - no transitive dependencies
32
partial dependencies
non-key attribute depends on only part of a composite primary key instead of entire key (violates 2NF)
33
transitive dependency
non-key attribute depends on another non-key attribute that's dependent on primary key