Database Design for Mere Mortals Ch. 8 Flashcards

1
Q

State the three reasons why keys are important.

A

— Ensure that each record in a table is properly identified
— Help establish and enforce various types of integrity
— Serve to establish table relationships

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

What are the four main types of keys?

A
  1. Candidate
  2. Primary
  3. Foreign
  4. Non
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the purpose of a Candidate Key?

A

Uniquely identify a single instance of the table’s subject

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

State four items of the Elements of a Candidate Key.

A

— Cannot be a multipart field
— Must contain unique values
— Cannot contain Null
— Its value is not optional in whole or in part
— Comprises a minimum number of fields necessary to define uniqueness
— Values must uniquely and exclusively identify each record in the table
— Its value must exclusively identify the value of each field within a given record
— Its value can be modified only in rare or extreme cases

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

True or False: A candidate key can be composed of more than one field.

A

True

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

Can a table have more than one candidate key?

A

Yes

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

What is an artificial candidate key?

A

A field you create for the sole purpose of serving as a candidate key. You create this type of key when there are no ‘naturally occurring’ candidate keys in a table

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

What is the most important key you assign to a table?

A

The primary key

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

Why is the primary key important?

A

— A primary key field exclusively identifies the table throughout the database structure and helps establish relationships with other tables
— A primary key value uniquely identifies a given record within a table and exclusively represents that record throughout the entire database. It also helps to guard against duplicate records

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

How do you establish a primary key?

A

By examining the table’s pool of available candidate keys and then selecting one as the primary key

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

State four items of the Elements of a Primary Key.

A

— Cannot be a multipart field
— Must contain unique values
— Cannot contain Null
— Its value is not optional in whole or in part
— Compromises a minimum number of fields necessary to define uniqueness
— Its value must uniquely and exclusively identify each record in the table
— Its value must exclusively identify the value of each field within a given record
— Its value can be modified only in rare or extreme cases

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

What must you do before you finalize your selection of a primary key?

A

You must make absolutely certain that it exclusively identifies the value of each field within a given record and meets all the Elements of a Primary Key

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

What is an alternate key?

A

A candidate key that was not chosen to serve as the primary key of the table

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

What do you ensure by establishing table-level integrity?

A

— There are no duplicate records in a table
— The primary key exclusively identifies each record in a table
— Every primary key value is unique
— Primary key values are not Null

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

Why should you review the initial table structures?

A

— Ensure that the appropriate subjects are represented in the database
— Make certain that the table names and table descriptions are suitable and meaningful to everyone
— Make certain that the field names are suitable and meaningful to everyone
— Verify that all the appropriate fields are assigned to each table

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