Database Reference
In-Depth Information
The STUDENT table
The CLASS table
The GRADE table with
foreign keys—now
each grade is linked
back to the STUDENT
and CLASS tables
Figure 1-3
the Key Database
Characteristic: related
tables
the relationships between the tables. For example, in the STUDENT table, StudentNumber
serves as the primary key. Each value of StudentNumber is unique and identifies a par-
ticular student. Thus, StudentNumber 1 identifies Sam Cooke. Similarly, ClassNumber in
the CLASS table identifies each class. If the numbers used in primary key columns such as
StudentNumber and ClassNumber are automatically generated and assigned in the database
itself, then the key is also called a surrogate key .
By comparing Figures 1-2 and 1-3, we can see how the primary keys of STUDENT and CLASS
were added to the GRADE table to provide GRADE with a primary key of (StudentNumber,
ClassNumber) to uniquely identify each row. More important, in GRADE, StudentNumber and
ClassNumber each now serve as a foreign key . A foreign key provides the link between two
tables. By adding a foreign key, we create a relationship between the two tables.
Figure 1-4 shows a Microsoft Access 2013 view of the tables and relationships shown in
Figure 1-3. In Figure 1-4, primary keys in each table are marked with key symbols, and con-
necting lines representing the relationships are drawn from the foreign keys (in GRADE) to the
corresponding primary keys (in STUDENT and CLASS). The symbols on the relationship line
(the number 1 and the infinity symbol) mean that, for example, one student in STUDENT can
be linked to many grades in GRADE.
Databases Create Information
In order to make decisions, we need information upon which to base those decisions. Because we
have already defined data as recorded facts and numbers, we can now define 1 information as:
Knowledge derived from data
Data presented in a meaningful context
Data processed by summing, ordering, averaging, grouping, comparing, or other
similar operations
1 These definitions are from David M. Kroenke's topics Using MIS , 6th ed. (Upper Saddle River, NJ: Prentice-Hall,
2014) and Experiencing MIS , 4th ed. (Upper Saddle River, NJ: Prentice-Hall, 2014). See these topics for a full dis-
cussion of these definitions, as well as a discussion of a fourth definition, “a difference that makes a difference.”
 
 
Search WWH ::




Custom Search