Database Normalization Flashcards

1
Q

What does the 1st normal form (1NF) aim to do?

A

Eliminates repeating groups

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

What does the 2nd normal form (2NF) aim to do?

A
  1. Eliminates repeating groups
    AND
  2. Eliminates redundant data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does the 3rd normal form (3NF) aim to do?

A
  1. Eliminates repeating groups
  2. Eliminates redundant data
  3. Eliminates columns not dependent on the primary key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are some of the general principles for database normalization?

A
  1. Normal forms are additive
  2. “One fact, one place”
  3. All database tables should be in 3NF for this course.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When a table is not normalized, what is the database table referred as?

A

This database table would be considered a “flat file” which refers to a data file containing records with no structured relationships.

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

To put the tables in 3NF, we must ensure that:

A

Each table contains only data that helps us understand the primary key.

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

To put the table in 2NF, we must:

A

eliminate redundant data

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

To put the table in 1NF, we must:

A

eliminate repeating groups

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

What is a junction table?

A

It shows the relationship between two other tables.

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

Give one example of a junction table:

A

The client/services table is a junction table.

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

Junction tables normally have a __________.

A

compound primary key

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

Why do we need junction tables?

A

They are required when “many” instances of one item can be associated with “many” instances of another.
- Each client can have many services; each service can be associated with many clients.

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

Junction tables may join:

A
  1. Two master tables (Doctor/patient table)
  2. Two transaction tables (Bill client/collect payment table)
  3. One transaction table and one master table (Buy inventory/inventory table)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Why would Student/class be a required junction table?

A

A student may take many classes; each class may be taken by many students.

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

Why would Book/author be a required junction table?

A

A book may have many authors; an author may publish many books.

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

Why would Purchases/inventory be a required junction table?

A

A purchase transaction may involve many different inventory items; each inventory item may be purchased multiple times.

17
Q

Why would Sales/inventory be a required junction table?

A

A sales transaction may involve many different inventory items; each item may be sold multiple times.

18
Q

What are the purposes for normalization?

A
  1. Eliminate redundancy (one fact, one place)
  2. Facilitate searches and queries
  3. Minimize space allocations
  4. Provide needed data as effectively and efficiently as possible