Week 6 Flashcards

1
Q

What is normalization?

A

Normalization is the process for evaluating and correcting table structures to minimize data redundancies and data anomalies.

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

What are the characteristics of well normalized table structures?

A

The characteristics of well normalized table structure are:

  • Each table represents a single subject
  • No data item will be unnecessarily stored in more than one table
  • All attributes in a table are dependent on the primary key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the three normal forms?

A

The three normal forms are:
1. First normal form (1NF)
2. Second normal form (2NF)
3. Third normal form (3NF)

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

Why is normalization needed?

A

Normalization is needed because it:

  • Is an important part of designing a new database structure
  • Analyses the relationship among the attributes within each entity
  • Determines if the structure can be improved
  • Improves the existing data structure and creates an appropriate database design(Each table is free from anomalies of insertion, update, and deletion)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the steps for normalization?

A
  1. Identify dependencies of each table
  2. Progressively break the table into new set of tables
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is functional dependency?

A

Functional dependency is where the value of attribute A determines one and only one value of attribute B

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

What is partial dependency?

A

Partial dependency is where an attribute value depends on a portion of a composite primary key. For example:

If (A+B) –> (C, D, …)

Where (A+B) is the primary key

If B –> C (C is dependant on B)
Then this would be a partial dependency because attribute C depends on only a part of the composite primary key (Which is B)

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

What is transitive dependency?

A

Transitive dependency is where a non-primary key attribute is dependent on another non-primary key attribute. For example:

If (A+B) –> (C, D, …)

Where (A+B) is the primary key

If C –> D (D is dependant on C)
Then this would be a transitive dependency because D is a non-primary key attribute and depends on C which is also a non-primary key attribute.

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

How do you organise dependencies in a dependency diagram?

A

Desirable dependencies should go above the diagram, such as dependency based on primary key whereas less desirable dependencies such as partial and transitive dependencies should go below the diagram.

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

When is a table considered to be in first normal form (1NF)?

A

A table is considered to be in first normal form (1NF) when:

  • There are no repeating groups in the table
  • All the key attributes are defined
  • All attributes are dependent on the primary key
  • All relational tables satisfy 1NF requirements
  • May contain other (partial or transitive) dependencies thus subject to data redundancies and various anomalies
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

When is a table considered to be in second normal form (2NF)?

A

A table is considered to be in second normal form (2NF) when:

  • It is in 1NF and
  • It contains no partial dependencies (no attribute is dependant on only a portion of a composite primary key)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

When is a table considered to be in third normal form (3NF)?

A

A table is considered to be in third normal form (3NF) when:

  • It is in 2NF and
  • It contains no transitive dependencies (no non-primary key is dependent on another non-primary key attribute)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the steps for conversion to First Normal Form (NNF –> 1NF)

A
  1. Eliminate the repeating groups
  2. Identify the primary key
  3. Identify all dependencies
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a surrogate key?

A

A surrogate is a system defined attribute that is used when the primary key is considered to be unsuitable. They are created and managed via the DBMS

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