CH5 Flashcards Preview

COM 330 > CH5 > Flashcards

Flashcards in CH5 Deck (18)
Loading flashcards...
1
Q

Transforming a Data Model into a Relational Design

A

• Create a relation for each entity.
– A relation has a descriptive name and a set of attributes that describe the entity.
• Specify a primary key.
• Specify column properties
• The relation is then analyzed using the normalization rules

2
Q

Column Properties

A

– Data type
– Null status
– Default values (if any)
– Data constraints (if any)

3
Q

Modification Problems

A

• Tables that are not normalized will experience issues known as modification problems

4
Q

Solving Modification Problems

A

• Most modification problems are solved by breaking an existing table into two or more tables through a process known as normalization.

5
Q

Functional Dependency

A

The relationship (within the relation) that describes how the value of one attribute may be used to find the value of another attribute.

6
Q

Determinant

A

The attribute that can be used to find the value of another attribute in the relation

7
Q

Candidate Key

A

– The value of a candidate key can be used to find the value of every other attribute in the table.
– A simple candidate key consists of only one attribute. – A composite candidate key consists of more than one attribute.

8
Q

Normal Forms

A

– First Normal Form (1NF)
– Second Normal Form (2NF)
– Third Normal Form (3NF)
– Boyce-Codd Normal Form (BCNF)

9
Q

Normalization

A

breaking them apart into many component relations

10
Q

Denormalization

A
  • There are situations where denormalized relations are preferred.
  • Fundamental reason to denormalize is to improve query performance
11
Q

Representing Weak Entities

A
  • If not ID-dependent, use the same techniques as for strong entities.
  • If ID-dependent, then must add primary key of the parent entity.
12
Q

1:1 Relationships

A

– The key from one relation is placed in the other as a foreign key.
– It does not matter which table receives the foreign key

13
Q

1:N Relationships

A

• However, in a 1:N the foreign key always goes into the many-side of the relationship.
– The 1 side is called the parent.
– The N side is called the child.

14
Q

N:M Relationship

A

• To create an N:M relationship, a new table is created. This table is called an intersection table.

15
Q

Intersection Table

A

• An intersection table has a composite key consisting of the keys from each of the tables that it connects.

16
Q

Association Relationships

A

When an intersection table has columns beyond those in the primary key

17
Q

Supertype/Subtype Relationships

A

• The identifier of the supertype becomes the primary key and the foreign key of each subtype

18
Q

Recursive Relationships

A
  • A recursive relationship is a relationship that a relation has with itself.
  • Recursive relationships adhere to the same rules as binary relationships.