Chapter 5 The Relational Database Model: Introduction
5-1
Last Update: November 9, 2011 — 8AM
Chapter 5: The Relational Database Model: Introduction
Multiple Choice
1. The relational data model was first described in a paper by Dr. E. F. Codd in ____.
a. 1965
b. 1970
c. 1975
d. 1980
e. 1985
2. Relational database management first became commercially viable in ____.
a. the late 1960s
b. the early 1970s
c. the late 1970s
d. the early 1980s
e. the late 1980s
3. All of the following events and factors in the early 1980s led to the introduction of
relational database management, except ____.
a. the introduction of personal computers
b. the fact that hierarchical and network DBMSs were too complex for the PC
environment
c. the need for a DBMS approach that would make the database design process
simpler than that of the hierarchical and network approaches
d. improvements in relational DBMS performance
e. improvements in mainframe computer performance
4. In relational database, the basic data structure that appears to be similar to a file is
called a ____.
Chapter 5 The Relational Database Model: Introduction
5-2
a. relation
b. attribute
c. record
d. column
e. row
5. In a relation ____.
a. several rows can be identical
b. the columns must be arranged in a single, particular order
c. the rows must be arranged in a single, particular order
d. a single row/column position, called a cell, can have multiple values
e. None of the above.
6. The values of the primary key of a relation ____.
a. cannot be unique
b. may be unique or non-unique
c. must be unique
d. must consist of a single attribute
e. None of the above.
7. The values of a candidate key of a relation ____.
a. cannot be unique
b. may be unique or non-unique
c. must be unique
d. must consist of a single attribute
e. None of the above.
8. A candidate key of a relation that is not chosen to be the primary key ____.
a. is called a foreign key
b. is called an alternate key
Chapter 5 The Relational Database Model: Introduction
5-3
c. is called a relationship key
d. does not have to have unique values
e. does not have to be wholly contained within the relation
9. An attribute or combination of attributes that is a foreign key in one relation of a
database must be ____ another relation in the database.
a. the primary key of
b. a secondary key of
c. an alternate key of
d. a non-unique attribute or combination of attributes of
e. None of the above.
10. The attribute(s) that make up a foreign key in a relation of a database ____.
a. cannot appear in another relation of the database
b. may or may not appear in another relation of the database
c. must appear in another relation of the database
d. must have unique values in the relation in which it is a foreign key
e. must be part of the primary key in the relation in which it is a foreign key
11. A foreign key ____.
a. must have the same column name(s) as the primary key from which it is derived
b. must not have the same column name(s) as the primary key from which it is
derived
c. must have the same domain of values as the primary key from which it is derived
d. must not have the same domain of values as the primary key from which it is
derived
e. must have a domain of values that is different from any other in the database
12. Doctors and patients are in a binary one-to-many relationship as:
Doctor Patient
Chapter 5 The Relational Database Model: Introduction
To accomplish this in a relational database _____.
a. The primary key of the DOCTOR relation is placed as a foreign key in the
PATIENT relation.
b. The primary key of the PATIENT relation is placed as a foreign key in the
DOCTOR relation.
c. Either of choice a or b will work.
d. Neither of choice a or b will work.
e. Nothing extra has to be done to accomplish this in a relational database.
13. An attribute(s) that functions as the primary key of relation A and as a foreign key in
relation B of a relational database ____.
a. must have unique values in both relations
b. must have unique values in relation A
c. must have unique values in relation B
d. must not have unique values in either relation
e. must have unique values in one relation if it has unique values in the other
14. An attribute(s) that acts as a foreign key in a relation ____.
a. must be the entire primary key of that relation
b. cannot be part of the primary key of that relation
c. may be part of the primary key of that relation
d. must also be a foreign key in another relation of the database
e. None of the above.
15. Storing a binary many-to-many relationship in a relational database ____.
a. requires the insertion of a foreign key in one of the two relations representing the
entities in the many-to-many relationship
b. requires the insertion of foreign keys in both of the relations representing the
entities in the many-to-many relationship
c. does not require the addition of any additional relations
d. requires the addition of one additional relation
e. requires the addition of two additional relations
Chapter 5 The Relational Database Model: Introduction
16. The primary key of the relation added to accomplish the many-to-many relationship
____.
a. must contain at least three attributes
b. must contain at least four attributes
c. is the primary key of one of the two relations involved in the many-to-many
relationship
d. does not involve the primary keys of either of the two relations involved in the
many-to-many relationship
e. is the combination of the primary keys of the two relations involved in the many-
to-many relationship plus possible additional attributes
17. Consider relations X and Y, each representing one of two entities in a many-to-many
binary relationship. Relation Z is the additional relation created to store the many–to–
many relationship. Intersection data ____.
a. is stored in relation X or in relation Y, but not in both
b. must be stored in both relations X and Y
c. is stored in relation Z
d. is stored in all three relations X, Y, and Z
e. cannot be stored in any of relations X, Y, or Z
18. All of the following are true about storing a one-to-one binary relationship in a
relational database, except _____.
a. an additional relation must be added to the database
b. two additional relations must be added to the database
c. the primary key of one of the relations in placed in the other relation as a foreign
key
d. the two relations involved in the one-to-one relationship can be combined into one
relation
e. a particular value of the primary key of one relation is associated with exactly one
value of the primary key of the other relation (or possibly with none)
19. Which of the following relational algebra commands or combination of commands is
capable of retrieving one or more columns of a relation?
a. Select.
b. Project.
c. Join.
d. Select and Project.
e. Select, Project, and Join.
20. Which of the following relational algebra commands or combination of commands is
capable of retrieving one or more rows of a relation?
a. Select.
b. Project.
c. Join.
d. Select and Project.
e. Select, Project, and Join.
21. Which of the following relational algebra commands or combination of commands is
capable of retrieving a single cell value from a relation?
a. Select.
b. Project.
c. Join.
d. Select and Project.
e. Select, Project, and Join.
22. Which of the following relational algebra commands or combination of commands is
capable of retrieving a single cell value from the integrated result of two relations?
a. Select.
b. Project.
c. Join.
d. Select and Project.
e. Select, Project, and Join.
23. The result of a relational operation will always be a ____.
a. single cell value
b. row
c. column
d. relation
e. join
24. A relational DBMS is capable of automating the cross-relation data extraction process
in such a way that it appears that the data in the relation is integrated ____.
a. by a relational Select command
b. by a relational Project command
c. by the combination of relational Select and Project commands
d. while also remaining redundant
e. while also remaining nonredundant
25. Which of the following is true about the join fields used in a relational Join
command?
a. They must have the same attribute names.
b. They must have the same domain of values.
c. They must both be foreign keys.
d. All of the above.
e. None of the above.
26. A join in which one of the two identical join columns in the result is eliminated is
called a(n) ____.
a. semijoin
b. equijoin
c. compound join
d. natural join
e. complex join
27. The additional relation added to store a many-to-many relationship ____.
a. may have intersection data
b. must have intersection data
c. must not have intersection data
d. can only have intersection data if it is part of the primary key
e. can only have intersection data if it is part of a foreign key
True/False
1. The emergence of the personal computer influenced the emergence of relational
database management.
2. Performance issues delayed the introduction of relational database management
systems as viable commercial products.
3. Today, relational DBMSs have limited commercial use in niche areas only.
4. In relational database terminology, the terms column and tuple are synonymous.
5. In relational database terminology, the terms row and relation are synonymous.
6. The columns of a relation can be arranged in any order without affecting the meaning
of the data.
7. No two rows of a relation are identical.
8. A relation’s primary key field can have non-unique values.
9. A relation’s primary key can include more than one attribute.
10. A candidate key that is not chosen as a relation’s primary key is called an alternate
key.
11. In a one-to–many binary relationship, the primary key from the “many side” of the
relationship is inserted as a foreign key in the “one side” of the relationship.
12. Depending on the circumstances, it is possible that a foreign key is part of the primary
key of the relation in which it is a foreign key.
5-10
13. A foreign key must have unique values in the relation in which it is a foreign key.
14. Storing a many-to-many relationship in a relational database requires the creation of
an additional relation.
15. Intersection data in a relational database is stored in one of the two relations
representing the entities in the many-to-many relationship.
16. Storing a many-to-many relationship in a relational database would require the
creation of an additional relation even if there was no intersection data.
17. Intersection data describes the many-to-many relationship between two entities.
18. The two primary keys representing the entities in the many-to-many relationship will
always serve as the primary key in the additional relation representing the many-to–
many relationship.
19. All of the data involved in a one-to-one binary relationship could be combined in one
relation.
Chapter 5 The Relational Database Model: Introduction
20. A one-to-one binary relationship can utilize a foreign key in much the same way as a
one-to-many binary relationship.
21. The relational Select operator retrieves one or more columns from a relation.
22. The relational Project operator retrieves one or more rows from a relation.
23. The result of a relational algebra operation is a relation.
24. The combination of a relational Select and a relational Project operation can return a
single data value.
25. The relational Join operation accomplishes data integration in a relational database.
26. In relational database management, data integration takes place at the time that a
relational query is processed.
5-12
27. In a relational Join operation, the join attributes must have the same attribute names.
28. In a relational Join operation, the join attributes must have the same domain of values.
29. In an equijoin, one of the two identical join columns in the result is eliminated.
Problems
1. Consider the following relational database for the Central Zoo. Central Zoo wants to
maintain information about its animals, the enclosures in which they live, and its
zookeepers and the services they perform for the animals. In addition, Central Zoo has a
program by which people can be sponsor of animals. Central Zoo wants to track its
sponsors, their dependents, and associated data.
Each animal has a unique animal number and each enclosure has a unique enclosure
number. An animal can live in only one enclosure. An enclosure can have several
animals in it or it can be currently empty. A zookeeper has a unique employee number.
Every animal has been cared for by at least one and generally many zookeepers; each
zookeeper has cared for at least one and generally many animals. Each time a
zookeeper performs a specific, significant service for an animal the service type, date,
and time are recorded. A zookeeper may perform a particular service on a particular
animal more than once on a given day.
A sponsor, who has a unique sponsor number and a unique social security number,
sponsors at least one and possibly several animals. An animal may have several
sponsors or none. For each animal that a particular sponsor sponsors, the zoo wants to
track the annual sponsorship contribution and renewal date. In addition, Central Zoo
wants to keep track of each sponsor’s dependents. A sponsor may have several
dependents or none. A dependent is associated with exactly one sponsor.
Chapter 5 The Relational Database Model: Introduction
5-13
Enclosure
Number
Type
Location
Size
Date
Built
ENCLOSURE Relation
Animal
Number
Species
Animal
Name
Country
Of Birth
Weight
Enclosure
Number
ANIMAL Relation
Employee
Number
Employee
Name
Title
Year
Hired
ZOOKEEPER Relation
Animal
Number
Employee
Number
Service
Type
Date
Time
CARES FOR Relation
Sponsor
Number
Social Security
Number
Sponsor
Name
Address
Telephone
SPONSOR Relation
Animal
Number
Annual
Contribution
Renewal
Date
CONTRIBUTION Relation
Sponsor
Number
Dependent
Name
Relationship
Date of
Birth
DEPENDENT Relation
a. Identify the candidate keys of each relation.
b. Identify the primary key and any alternate keys of each relation.
c. How many foreign keys does each relation have?
d. Identify the foreign keys of each relation.
e. Indicate any instances in which a foreign key serves as part of the primary key of
the relation in which it is a foreign key. Why does each of those relations require
a multi-attribute primary key?
f. Identify the relations that support many-to-many relationships, the primary keys
of those relations, and any intersection data.
Chapter 5 The Relational Database Model: Introduction
5-14
g. Using the informal relational command language described in this chapter, write
commands to:
i. Retrieve the record for animal number 58560.
ii. Retrieve the record for the tiger named Stripes.
iii. List all of the tigers born in India.
iv. List the name and animal number of every animal born in China that
weighs less than 100 pounds .
v. List the name and number of every tiger.
vi. What is the country of birth of animal number 74371?
vii. What is the type and size of the enclosure used for animal number 74371?
viii. List the name and address of every sponsor of animal number 74371.
Answer
Chapter 5 The Relational Database Model: Introduction
5-15
2. Consider the following relational database for Grand Travel Airlines.
Grand Travel Airlines has to keep track of its flight and airplane history. A flight is
uniquely identified by the combination of a flight number and a date. Every
passenger who has flown on Grand Travel has a unique passenger number. For a
Chapter 5 The Relational Database Model: Introduction
5-16
particular passenger who has taken a particular flight, the company wants to keep
track of the fare that she paid for it and the date that she made the reservation for it.
Clearly, a passenger may have taken many flights (he must have taken at least one to
be in the database) and every flight has had many passengers on it.
A pilot is identified by a unique pilot (or employee) number. A flight on a particular
date has exactly one pilot. Each pilot has typically flown many flights but a pilot may
be new to the company, is in training, and has not flown any flights, yet. Each
airplane has a unique serial number. A flight on a particular date used one airplane.
Each airplane has flown on many flights and dates, but a new airplane may not have
been used at all, yet.
Pilot
Number
Pilot
Name
Date of
Birth
Date of
Hire
PILOT Relation
Flight
Number
Date
Departure
Time
Arrival
Time
Pilot
Number
Airplane
Number
FLIGHT Relation
Passenger
Number
Passenger
Name
Telephone
Number
PASSENGER Relation
Flight
Number
Date
Passenger
Number
Fare
Reservation
Date
RESERVATION Relation
Airplane
Number
Passenger
Capacity
Year
Built
Manufacturer
AIRPLANE Relation
a. Identify the candidate keys of each relation.
b. Identify the primary key and any alternate keys of each relation.
c. How many foreign keys does each relation have?
d. Identify the foreign keys of each relation.
Chapter 5 The Relational Database Model: Introduction
5-17
e. Indicate any instances in which a foreign key serves as part of the primary key of
the relation in which it is a foreign key. Why does each of those relations require
a multi-attribute primary key?
f. Identify the relations that support many-to-many relationships, the primary keys
of those relations, and any intersection data.
g. Using the informal relational command language described in this chapter, write
commands to:
i. Retrieve the record for airplane number 36325.
ii. Retrieve the record for the pilot named Sarah Johnson who was born on
5/22/1959.
iii. List all of the airplanes manufactured by Boeing.
iv. List the airplane number and passenger capacity of every airplane
manufactured by Boeing in 1997 .
v. List the airplane number, model, and manufacturer of every airplane.
vi. What company manufactured airplane number 53489?
vii. What was the name and date of birth of the pilot of flight number 182 on
10/30/2003?
viii. List the airplane number, model, and manufacturer of every airplane that
was used on flight 118 in 2003.
Answer
Chapter 5 The Relational Database Model: Introduction
5-18