Database Reference
In-Depth Information
Keyfieldsplayanimportant partinarelational database, andyoumustlearnhowtocreate
and use them. You'll learn more about primary keys in Chapter 8 , “ Keys , ” and Chapter 10 ,
Table Relationships .
Index
An index is a structure that an RDBMS provides to improve data processing. Your partic-
ular RDBMS program will determine how the index works and how you use it. However,
an index has absolutely nothing to do with the logical database structure! The only reason
I include the term index in this chapter is that people often confuse it with the term key.
Index and key are just two more terms that are widely and frequently misused throughout
the database industry and in numerous database-related publications and web sites. (Re-
member my comments on data and information? ) You'll always know the difference
between the two if you remember that keys are logical structures you use to identify re-
cords within a table, and indexes are physical structures you use to optimize data process-
ing.
Relationship-Related Terms
Relationships
A relationship exists between two tables when you can in some way associate the records
of the first table with those of the second. You can establish the relationship via a set of
primary and foreign keys (as you learned in the previous section) or through a third table
known as a linking table (also known as an associative table ). The manner in which you
establish the relationship really depends on the type of relationship that exists between the
tables. (You'll learn more about that in a moment.) While Figure 3.11 illustrated a relation-
ship established via primary/foreign keys, Figure 3.12 illustrates a relationship established
with a linking table.
Search WWH ::




Custom Search