7: Normalization

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/47

encourage image

There's no tags or description

Looks like no tags are added yet.

48 Terms

1
New cards

Normalization

A process for evaluating and correcting table structures to minimize data redundancies, which reduces the likelihood of data anomalies. It assigns attributes to tables based on determination.

2
New cards

Main goal of normalization

To eliminate data anomalies by eliminating unnecessary or unwanted data redundancies.

3
New cards

Normal forms

The series of stages that normalization works through: 1NF, 2NF, 3NF, then the higher forms BCNF, 4NF and 5NF.

4
New cards

Data anomalies

Insertion, update and deletion problems caused by unnecessary data redundancy. A well-normalized table has none of them.

5
New cards

Functional dependency

The concept normalization uses to identify which attribute determines other attributes (A → B means the value of A determines the value of B).

6
New cards

Determinant

An attribute (or set of attributes) whose value determines the values of other attributes in a functional dependency.

7
New cards

Prime attribute vs. nonprime attribute

A prime (key) attribute is part of a candidate key. A nonprime (nonkey) attribute is not part of any key. In a well-formed table, all nonprime attributes depend on the primary key.

8
New cards

Two situations where designers use normalization

1) When designing a new database structure. 2) When analyzing the relationships among attributes within each entity to see whether the structure can be improved.

9
New cards

Characteristics of a well-formed relation

Each table represents a single subject. Each row/column intersection holds only one value. No data item is unnecessarily stored in more than one table. All nonprime attributes depend on the primary key. The table has no insertion, update or deletion anomalies.

10
New cards

How far to normalize for business databases

For most business database design, 3NF is as high as you need to go. Higher forms such as 5NF and DKNF are unlikely in a business environment.

11
New cards

Normalization works how many relations at a time?

One relation (table) at a time, identifying the dependencies of that relation.

12
New cards

First normal form (1NF)

Table format with no repeating groups and the primary key identified. All key attributes are defined and all attributes depend on the primary key.

13
New cards

Second normal form (2NF)

The table is in 1NF and has no partial dependencies.

14
New cards

Third normal form (3NF)

The table is in 2NF and has no transitive dependencies.

15
New cards

Boyce-Codd normal form (BCNF)

The table is in 3NF and every determinant in the table is a candidate key. BCNF is a special case of 3NF.

16
New cards

Fourth normal form (4NF)

The table is in 3NF (BCNF in the textbook table) and has no independent multivalued dependencies.

17
New cards

Fifth normal form (5NF)

Also called project-join normal form (PJNF). The table is in 4NF and cannot be decomposed into smaller tables any further without losing data or creating incorrect information (no further lossless decomposition).

18
New cards

Project-join normal form (PJNF)

Another name for fifth normal form (5NF).

19
New cards

Partial dependency

A functional dependency in which the determinant is only part of the primary key. It assumes there is only one candidate key. Partial dependencies are fairly easy to identify.

20
New cards

Transitive dependency

A dependency in which an attribute depends on another attribute that is not part of the primary key. Transitive dependencies are harder to identify, and they occur only when a functional dependency exists among nonprime attributes.

21
New cards

Repeating group

A group of multiple entries of the same type that can exist for any single key attribute occurrence.

22
New cards

Three steps of conversion to 1NF

1) Eliminate the repeating groups. 2) Identify the primary key. 3) Identify all dependencies.

23
New cards

Dependency diagram

A diagram that shows all the dependencies within a given table structure. It gives an overview of how the table's attributes relate, so an important dependency is less likely to be overlooked.

24
New cards

Do all relational tables satisfy 1NF?

Yes. All relational tables satisfy 1NF, but some still contain partial dependencies.

25
New cards

When is a 1NF table automatically in 2NF?

When it has a single-attribute primary key. Conversion to 2NF is needed only when the 1NF table has a composite primary key.

26
New cards

Steps to convert 1NF → 2NF

1) Make new tables to eliminate partial dependencies. 2) Reassign the corresponding dependent attributes.

27
New cards

Steps to convert 2NF → 3NF

1) Make new tables to eliminate transitive dependencies. 2) Reassign the corresponding dependent attributes.

28
New cards

Atomic attribute

An attribute that cannot be subdivided any further.

29
New cards

Atomicity (of an attribute)

The characteristic of an attribute that cannot be divided into smaller units. Don't confuse this with transaction atomicity (ACID) from Module 11.

30
New cards

Granularity

The level of detail represented by the values stored in a table's row.

31
New cards

Ways to improve a normalized design

Minimize data entry errors. Evaluate naming conventions. Refine attribute atomicity. Identify new attributes and relationships. Refine primary keys for data granularity. Maintain historical accuracy. Evaluate the use of derived attributes.

32
New cards

Surrogate key

A system-defined attribute, usually created and managed by the DBMS. It is typically a numeric value that increments automatically for each new row. Designers use one when the natural primary key is unsuitable.

33
New cards

Candidate key

A key with the same characteristics as a primary key that was not chosen to be the primary key. It is a minimal superkey.

34
New cards

When are 3NF and BCNF equivalent?

When the table contains only one candidate key. BCNF can be violated only when a table has more than one candidate key.

35
New cards

Multivalued dependency

A row contains two or more independent multivalued facts about an entity. Removing these takes a table from 3NF to 4NF.

36
New cards

Two rules that make 4NF 'academic'

1) All attributes must depend on the primary key but be independent of each other. 2) No row may contain two or more multivalued facts about an entity.

37
New cards

Lossless decomposition

When the decomposed tables are joined back together, the original table is recreated exactly.

38
New cards

Limit on the value of higher normal forms

Their value is limited by the extra processing needed to work with the data. The lower normal forms are generally very desirable and should always be considered in design.

39
New cards

Normalization and database design principles

Normalization should be part of the design process. Proposed entities must meet the required normal form before table structures are created. The ERD is built through an iterative process, and normalization focuses on the characteristics of specific entities.

40
New cards

Denormalization

Produces a lower normal form. The result is better performance but greater data redundancy.

41
New cards

Why normalization can slow a system

As tables are decomposed, the number of tables grows. Joining more tables takes extra input/output (I/O) operations and processing logic, which reduces system speed.

42
New cards

Defects of unnormalized tables

Data updates are less efficient because tables are larger. Indexing is more cumbersome. There are no simple strategies for creating views. They often lead to data redundancy disasters in production databases.

43
New cards

Data-modeling checklist: business rules

Document and verify all business rules with end users. Write them precisely, clearly and simply. They must help identify entities, attributes, relationships and constraints. Identify each rule's source, and make sure it is justified, dated and signed off by an approving authority.

44
New cards

Data-modeling checklist: entity names

Nouns familiar to the business, short and meaningful. Document abbreviations, synonyms and aliases. Unique within the model. Composite entities may combine abbreviated names of the entities they link. All names are limited in length.

45
New cards

Data-modeling checklist: entities

Each entity represents a single subject and a set of distinguishable instances. All entities should be in 3NF or higher, and any below 3NF must be justified. Granularity is clearly defined, and the PK supports that granularity.

46
New cards

Data-modeling checklist: attributes

Simple and single-valued (atomic). Document default values, constraints, synonyms and aliases. Clearly identify derived attributes and their sources. No redundancy unless needed for transaction accuracy, performance or history. Nonkey attributes fully depend on the PK.

47
New cards

Data-modeling checklist: relationships

Clearly identify relationship participants. Clearly define participation and connectivity, and document cardinality.

48
New cards

Data-modeling checklist: ER model

Validate against expected inserts, updates and deletions. Evaluate where, when and how to keep history. No redundant relationships except where required. Minimize data redundancy so updates happen in a single place.