Normalization Flashcards

1
Q

What is the normalization process used for?

A

We use the normalization process to group data elements into tables that represent entities.

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

What is normalization?

A

Normalization is the process of organizing data to minimize redundancy. It does not have storage anomalies.

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

How is normalization accomplished?

A

The organization of data is done by applying a series of rules to a data model.

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

What are the 4 most common stages of normal forms?

A
  • 0 Normal Form (0NF): un-normalized model before the normalization rules have been applied - First Normal Form (1NF) - Second Normal Form (2NF) - Third Normal Form (3NF
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the downside of normalization?

A

While normalization makes databases more efficient to maintain, they can also make them more complex because data is separated into many different tables This will require most queries to use table joins

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

How do you get to First Normal Form (1NF)?

A
  • Reduce entities to first normal form (1NF) by removing repeating or multi-valued attributes to another, child entity - To simplify, you cannot have multiple fields to capture multiple values - Most common ‘sins’ against the first normal form are the lack of a primary key and the use of repeating columns - Also, remove calculated field
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you get to Second Normal Form (2NF)?

A
  • Reduce first normal form entities to second normal form (2NF) by removing attributes that are not dependent on the whole primary key - The primary key for each record must be able to determine the value for all of the other fields in the record
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you get to Third Normal Form (3NF)?

A
  • Third normal form is violated when a non-key field is a fact about another non-key field - Reduce second normal form entities to third normal form (3NF) by removing attributes that are dependent on other attribute
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Quickly explain what the three normal forms eliminate.

A

1NF - Eliminate repeating groups and derived attributes. 2NF - Eliminate Redundant Data. 3NF - Eliminate Columns not dependent on key.

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

What are the Anomalies in 1NF?

A

Insertion Anomaly, Update Anomaly, Deletion Anomaly

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

Go into detail on the 1NF Insertion Anomaly.

A

Recall the first normal form again for the Purchase Order. If the database had only this table in it, we could not set up a Vendor or Item unless we had all the PO information

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

Go into detail on the 1NF Update Anomaly.

A

If the Description for an item changed, we would have to find the Description and change all occurrence

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

Go into detail on the 1NF Deletion Anomaly

A

Deleting the rows for a Purchase Order causes the loss of Vendor and Item information

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

What are the advantages on the 2NF anomalies?

A

INSERTION– An item can be added by itself without PO information UPDATE– If the Description for an item changed, only one occurrence would be affected DELETION– deleting a row for a PO has no effect on an Item record

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

What are the disadvantages on the 2NF anomalies?

A

INSERTION– Vendor cannot be set up by itself UPDATE– multiple records may need to be updated if Vendor address information changed DELETION– deleting rows for a PO causes loss of Vendor information

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

Advantages of 3NF

A
  • Vendor can be set up by itself. - Only one record needs updating if vendor address changes - Deleting rows for a PO does not cause loss of vendor information
17
Q

How would you take this Unnormalized table to 1NF?

A

By Populating STU_NO

18
Q

What is the key for this table in 1NF?

A

STU_NO + FEE

19
Q

How would you turn this 2NF to 3NF?

A
20
Q

How would you display a composite key in an ERD?

A
21
Q

What is a natural key?

A

A natural key is one that “naturally” occurs in

the data, like nursing unit id in CHD

22
Q

What is a surrogate key?

A

A surrogate key does not naturally occur in the

data and is usually a meaningless but unique

number (MBUN

23
Q

What Is OLTP and what does it stand for?

A

All examples considered thus far have been geared to Online Transaction Processing (OLTP)

Most common

Normalization rules promote unique (non redundant) data

24
Q

What Is OLAP and what does it stand for?

A

Why would data be collected, if it wasn’t going to be analyzed too?

Online Analytical Processing (OLAP) is one of the other significant database uses

Business Intelligence (BI) tools work with OLAP data to provide end users with the ability to analyze and report on the data in whatever way makes sense to the particular busines

25
Q

What are OLAP’s main attributes?

A
  • OLAP emphasizes speed and simplicity of access over data integrity
  • In fact, OLAP databases are explicitly de-normalized for this purpose
  • Data is also pre-summarized according to expected queries
  • Also known as Big Data or a Data Warehouse
26
Q

What is a Data Warehouse?

A

Offloading data from the OLTP to the OLAP database allows each database to be optimized for its particular task

This separation ensures that complex, heavy inquiries into the OLAP database don’t cause slow downs in the “production” databas

27
Q
A