Database Normalization Flashcards

1
Q

What is Normalization?

A

A systematic approach to organizing data in relational databases according to so-called normal forms.

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

What is the purpose of Normalization?

A

To reduce data redundancy and improve data integrity.

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

What is data redundancy?

A

A condition in which the same piece of data is held in two separate places.

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

What is data integrity?

A

Overall accuracy, completeness, and consistency of data.

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

Name 3 types of anomalies.

A

Create, Update and Delete

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

How many Normal Forms are there?

A

There are six normal forms, but usually, only the first three are used.

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

What is Functional Dependency (FD)?

A

A relationship that exists between two attributes. It typically exists between the primary key and non-key attribute within a table.

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

What are the 2 types of functional dependency?

A

Trivial and Non-Trivial.

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

What is Partial Dependency?

A

Partial Dependency occurs when a non-prime (non-key) attribute is functionally dependent on part of a candidate key.

For example, if we have a table where we store students, courses and grades, the grade is partially dependent on students and partially dependent on courses as well.

2NF eliminates Partial Dependency.

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

What is Transitive Dependency?

A

Whenever some indirect relationship happens to cause functional dependency.

Thus, if A -> B and B -> C are true, then A -> C happens to be a transitive dependency.

3NF eliminates Transitive Dependency.

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

What is Trivial Dependency?

A

The dependency of an attribute on a set of attributes if the set of attributes includes that attribute.

So, X -> Y is a trivial functional dependency if Y is a subset of X.

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

What is Non-Trivial Dependency?

A

In Non-trivial functional dependency, the dependent is strictly not a subset of the determinant.

Example: If X → Y and Y is not a subset of X, then it is called Non-trivial functional dependency.

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

What is First Normal Form (1NF)?

A
  • A table must not contain composite or multi-valued attributes (eg “Andrew, Jack” or “C/C++”).
  • A table must not contain repeating groups of attributes (each row must be unique).
  • All of the data items in a column must mean the same thing.
  • A table must have no repeating columns.
  • Each set of data must be identified with a primary key.
  • Each set of separate data must be in a separate table.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Difference between Simple and Single-Valued attributes?

A

A single-valued attribute can have only a single value. For example, a person can have only one ‘date of birth’, ‘age’ etc. But it can be a simple or composite attribute.

For example, ‘date of birth’ is a composite attribute, and ‘age’ is a simple attribute. But both are single-valued attributes.

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

How to read X -> Y?

A

X determines Y or Y is dependent on X.

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

Example of SID -> SNAME

A
17
Q

What is Closure?

A

The set of all those attributes which can be functionally determined from an attribute set is called a closure of that attribute set.

Closure of attribute set {X} is denoted as {X}+.

18
Q

Name 2 properties of Functional Dependency.

A

Reflexivity and Transitivity