Databases Reference
In-Depth Information
Every relation has a unique primary key consisting of one or more attributes that
have unique values in that relation. Multiple such unique attributes or combinations
of attributes that have the uniqueness property are called candidate keys. The
candidate keys that are not chosen to be the one primary key are called alternate
keys. If the primary key of one relation in the database also appears in another
relation of the database, it called a foreign key in that second relation. Foreign keys
tie relations together in the sense that they implement relationships between the
entities represented by the relations. A one-to-many relationship is implemented
by adding the primary key on the '' one side'' of the relationship to the relation
representing the '' many side'' of the relationship. Many-to-many relationships are
implemented by constructing an additional relation that includes the primary keys of
the two entities in the many-to-many relationship. Additional attributes that describe
the many-to-many relationship are called intersection data.
Three basic relational algebra commands permit data retrieval from a relational
database. The Select command retrieves one or more rows of a relation. The
Project command retrieves one or more columns of a relation. The Join command
accomplishes data integration by tying together relations that have a common
primary key/foreign key pair. These three commands can be used in combination to
retrieve the specific data required in a particular query.
KEY TERMS
Equijoin
Foreign key
Integrating data
Join operator
Natural join
Non-redundant data
Personal computer (PC)
Primary key
Project operator
Redundant data
Relation
Relational algebra
Relational database
Relational model
Row
Select operator
Tuple
Unique attribute
Alternate key
Attribute
Candidate key
Cell
Column
Data retrieval
Domain of values
Entity identifier
Entity type
QUESTIONS
1. Why was the commercial introduction of relational
database delayed during the 1970s? What factors
encouraged its introduction in the early 1980s?
2. How does a relation differ from an ordinary file?
3. Define the terms ''tuple'' and ''attribute.''
4. What is a relational database?
5. What are the characteristics of a candidate key?
6. What is a primary key? What is an alternate key?
7. Define the term ''foreign key.''
8. In your own words, describe how foreign keys are
used to set up one-to-many binary relationships in
relational databases.
9. Describe why an additional relation is needed to
represent a many-to-many relationship in a relational
database.
10. Describe what intersection data is, what it describes,
and why it does not describe a single entity.
11. What is a one-to-one binary relationship?
12. Describe the purpose and capabilities of:
a. The relational Select operator.
b. The relational Project operator.
c. The relational Join operator.
13. Describe how the join operator works.
Search WWH ::




Custom Search