Database Reference
In-Depth Information
Advanced Data Model-
ing
Data Modeling
301
A fast-paced class covering techniques such as advanced normalization and
ragged hierarchies.
Tennis Basics
Tennis One
For those new to the game of tennis; learn the key aspects of the game.
Juggling
Learn how to keep three balls in the air at once!
Based on our definition of a candidate key (and a candidate key's characteristics of being
unique, stable, and minimal) what would you choose as the candidate keys for each of these
entities?
For Student , Student Number appears to be a valid candidate key. There are eight stu-
dents and eight distinct values for Student Number . So unlike Student First Name and
Student Last Name , which can contain duplicates like Eddie Murphy , Student Number
appears to be unique. Student Birth Date can also contain duplicates, such as 5/10/1982 ,
which is the Student Birth Date for both Mickey Mouse and Donald Duck . However, the
combination of Student First Name , Student Last Name , and Student Birth Date may
make a valid candidate key.
For Attendance , we are currently missing a candidate key. Although the Attendance Date
is unique in our sample data, we will probably need to know which student attended which
class on this particular date.
For Class , on first glance it appears that all of its attributes are unique and any of them
would therefore qualify as a candidate key. However, Juggling does not have a Class Short
Name . Therefore, because Class Short Name can be empty, we cannot consider it a can-
didate key. In addition, one of the characteristics of a candidate key is that it is stable.
I know, based on my teaching experience, that class descriptions can change. Therefore,
Class Description Text also needs to be ruled out as a candidate key, leaving Class Full
Name as the best option for a candidate key.
Even though an entity may contain more than one candidate key, we can only select one
candidate key to be the primary key for an entity. A primary key is the candidate key that
has been chosen to be the unique identifier for an entity. An alternate key is a candidate key
that, although it has the properties of being unique, stable, and minimal, was not chosen as
the primary key but still can be used to find specific entity instances.
Search WWH ::




Custom Search