Chapter 13: Normalization Flashcards

1
Q

Normalization

A

The transformation of complex user views and data stores to a set of smaller, stable, and easily maintainable data structures

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

Main objective of the normalization process

A

To simplify all the complex data items that are often found in user views

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

Normalization of a Relation is Accomplished in Three Major Steps

A
  1. Remove repeating groups
  2. Remove partial dependencies
  3. Remove transitive dependencies
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

First Normal Form (1NF)

A
  • Remove repeating groups
  • The primary key with repeating group attributes are
    moved into a new table
  • When a relation contains no repeating groups, it is in first normal form
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Second Normal Form (2NF)

A
  • Remove any partially dependent attributes and place them in another relation
  • A relation is created for the data that are only dependent on part of the key and another for data that are dependent on both parts
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A partial dependency

A

when the data are dependent on a part of a primary key

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

Third Normal Form (3NF)

A
  • Must be in 2NF

- Remove any transitive dependencies

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

A transitive dependency

A

When nonkey attributes are dependent not only on the primary key, but also on a nonkey attribute

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

Guidelines for Master File/Database Relation Design

A
  • Each separate data entity should create a master database table
  • A specific data field should exist on one master table
  • Each master table or database relation should have
    programs to create, read, update, and delete the records
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Integrity Constraints

A

Entity integrity
Referential integrity
Domain integrity

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

Entity Integrity

A
  • The primary key cannot have a null value

- If the primary key is a composite key, none of the fields in the key can contain a null value

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

Referential integrity

A
  • Referential integrity governs the nature of records in a
    one-to-many relationship
  • Referential integrity means that all foreign keys in the many table (the child table) must have a matching record in the parent table
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Implications of referential integrity

A
  • You cannot add a record in the child (many) table without a matching record in the parent table
  • You cannot change a primary key that has matching child table records
  • You cannot delete a record that has child records
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Two ways referential integrity is implemented

A
  1. A restricted database updates or deletes a key only if
    there are no matching child records
  2. A cascaded database will delete or update all child
    records when a parent record is deleted or changed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Domain integrity

A

Domain integrity rules are used to validate the data

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

Two forms of domain integrity

A
  1. Check constraints, which are defined at the table level

2. Rules, which are defined as separate objects and can be used within a number of fields

17
Q

Anomalies

A

Data redundancy
Insert anomaly
Deletion anomaly
Update anomaly

18
Q

Date redundancy

A
  • When the same data is stored in more than one place in the database (Store data once!)
  • Solved by creating tables that are in third normal form
19
Q

Insert anomaly

A
  • Occurs when the entire primary key is not known and the database cannot insert a new record, which would violate entity integrity
  • Can be avoided by using a sequence number for the primary key
20
Q

Deletion anomaly

A

Happens when a record is deleted that results in the loss of other related data

21
Q

Update anomaly

A

When a change to one attribute value causes the database to either contain inconsistent data or causes multiple records to need changing

22
Q

Retrieving and Presenting Database Data

A
  • Choose a relation from the database
  • Join two relations together
  • Project columns from the relation
  • Select rows from the relation
  • Derive new attributes
  • Index or sort rows
  • Calculate totals and performance measures
  • Present data