Test Bank—Chapter Nine (Database Systems)
Multiple Choice Questions
1. Which of the following accesses a database in terms of a database model?
A. Application software B. Database management system C. Actual database
2. Which of the following describes only the portion of a database available to a particular user?
A. Database model B. Schema C. Subschema D. DBMS
3. Which of the following relational operations combine data from more than one relation?
A. SELECT B. PROJECT C. JOIN
4. Which of the following relational operations extracts entire columns from a relation?
A. SELECT B. PROJECT C. JOIN
5. Which of the following relational operations extracts entire rows from a relation?
A. SELECT B. PROJECT C. JOIN
6. Which of the following relational operations is performed by the SQL statement below?
SELECT A, B, C FROM X
A. SELECT B. PROJECT C. JOIN
7. Given the relation X below
X: A B C
2 5 7
3 3 3
4 3 2
5 2 8
what value will be extracted by the following query?
TEMP SELECT from X where B > C
RESULT PROJECT A from TEMP
A. 2 B. 3 C. 4 D. 5
8. Given the relation X below
X: A B C
2 5 7
3 3 3
4 4 2
5 2 8
what value will be retrieved by the following query?
TEMP SELECT from X where B = C
RESULT PROJECT B from TEMP
A. 2 B. 3 C. 4 D. 5
9. Given the relation below
X: A B C
2 5 7
3 3 6
4 4 2
5 2 2
what values will be retrieved by the following SQL statement?
SELECT A, B FROM X WHERE X.B = X.C
A. 2, 5 B. 3, 6 C. 2, 2 D. 5, 2
10. Given the two relations X and Y below
X: A B Y: C D
7 s t 3
2 z r 2
what value would be retrieved by executing the following SQL statement?
SELECT Y.C FROM X, Y WHERE X.A < Y.D
A. s B. z C. t D. r
11. Which of the following is not a potential problem caused by multiple transactions manipulating a
database at the same time?
A. Lost update problem B. Clustering C. Deadlock D. Incorrect summary problem
12. Which of the following features within a DBMS is not provided to maintain database integrity?
A. Concurrent transaction processing B. Log
C. Locking protocol D. Commit points
13. Which of the following data mining techniques would be applied when trying to identify traits that
characterize the citizens of a democracy who fail to vote?
A. Class description B. Class discrimination
C. Cluster analysis D. Association analysis
14. Which of the following data mining techniques would be applied when trying to identify traits that
predict whether a citizen in a democracy will or will not vote?
A. Class description B. Class discrimination
C. Cluster analysis D. Association analysis
15. Which of the following data mining techniques would be applied when trying to identify any
underlying heterogeneity within housing patterns in a community?
A. Class description B. Class discrimination
C. Cluster analysis D. Association analysis
16. Which of the following data mining techniques would be applied when trying to identify common
properties between different groups of shoppers?
A. Class description B. Class discrimination
C. Cluster analysis D. Association analysis
17. Which of the following file structures is most efficient in cases in which the file is always processed in
its entirety a predetermined order?
A. Sequential B. Indexed C. Hash
18. Which of the following file structures is commonly used for the storage of text files?
A. Sequential B. Indexed C. Hash
19. Which of the following file structures is associated with the problem of clustering?
A. Sequential B. Indexed C. Hash
20. Which of the following file structures requires a small “auxiliary” storage system that must be updated
as entries in the file are inserted or deleted.
A. Sequential B. Indexed C. Hash
Fill-in-the-blank/Short-answer Questions
1. In a relational database, information is presented as though it were stored in tables called
_________________ , each of which has columns called _________________ and rows
called _________________ .
2. Identify two database models.
____________________
____________________
3. The term “lossless decomposition” refers to a decomposition of one relation into several relations such
that _____________________________________________ .
4. Suppose a relation X had the attributes PartID (part identification number), StockGoal (quantity
held when fully stocked), and CurrentQuantity (quantity actually in stock). Complete the following
statement to obtain information about those parts that are not fully stocked.
Result SELECT from X where _________________________________________
5. Suppose a relation X had the attributes Name, EmployeeID, and Address. Complete the following
statement to obtain a list of the names and addresses of all employees.
Result ___________________________________ from X
6. Given the two relations X and Y below
X: A B Y: C D
2 s t 1
5 z r 3
w 2
what values would be in the tuple produced by the following statement?
Result JOIN X and Y where X.A < Y.D
______________________
7. Given the two relations X and Y below
X: A B Y: C D
2 s t 1
5 z r 3
w 2
what values would be in the tuple produced by the following statements?
Temp JOIN X and Y where X.A = Y.D
Result PROJECT X.B, Y.C from Temp
____________________
8. Given the two relations X and Y below
X: A B Y: C D
7 s t 1
3 z r 2
1 u
what values would be retrieved by executing the following statement?
SELECT X.A, X.B, Y.C
FROM X, Y
WHERE X.A < Y.D
_________________
9. Given the three relations X, Y, and Z below
X: A B Y: C D Z: E F
7 s t 4 2 w
3 z r 2 3 q
1 u
what values would be retrieved by executing the following statement?
SELECT X.B, Y.C, Z.F
FROM X, Y, Z
WHERE X.A > Y.D AND X.A = Z.E
_________________
10. Which of the operations SELECT, PROJECT, and JOIN are actually used when executing the
following SQL instruction?
SELECT A, B
FROM X
WHERE C = D
________________________________
11. Given the relation Employees containing the attributes Name, Address, and BirthDate, what
question is answered by the following sequence of operations?
Temp SELECT from Employees where BirthDate < “January 4, 1975”
Result PROJECT Name from Temp
________________________________
12. Given the relation Employees containing the attributes Name, Address, and CurrentJobID and
the relation Jobs containing the attributes JobID, SkillRating, Department, what question is
answered by the following sequence of operations?
Temp1 JOIN Employees and Jobs
where Employees.CurrentJobID = Jobs.JobID
Temp2 SELECT from Temp1 where Department = “Personnel”
Result PROJECT Name from Temp2
________________________________
13. Given the relation Employees containing the attributes Name, Address, and CurrentJobID and
the relation Jobs containing the attributes JobID, SkillRating, Department, what question is
answered by the following SQL statement?
SELECT SkillRating
FROM Employees, Jobs
WHERE Employees.Name = “Joe Smith”
AND Employees.CurrentJobID = Jobs.JobID
________________________________
14. Place an X in the space before those requests below that require data mining techniques rather than
traditional database techniques. Leave the other spaces blank.
_____ Identify all shoppers who bought dog food last week.
_____ Identify items that tend to be purchased by common shoppers.
_____ Identify any correlation between time–of-day and items purchased.
_____ Identify the items purchased during the first hour after opening the store.
15. Place an X in the space before those issues that are not problems associated with data mining. Leave the
other spaces blank.
_____ Cascading rollback
_____ Deadlock
_____ Incorrect summary problem
_____ Lost update problem
16. Place an X in the space before those questions whose answers might be obtained by means of sequential
pattern analysis. Leave the other spaces blank.
_____ What are progressing stages in youthful behavior that led to criminal activity?
_____ What are the symptoms of the various stages of a particular progressing disease?
_____ What crimes does a particular judge punish most harshly?
_____ What items had the highest sales volume last week?
17. Place an X in the space before those questions whose answers might be obtained by means of outlier
analysis. Leave the other spaces blank.
_____ Which are the flawed parts on a production line conveyor belt?
_____ What items have not sold during the last two days?
_____ What sales region generated the most orders over the last sales period?
_____ Which shoppers in a busy shopping mall are potential shoplifters?
18. Place an X in the space before those structures that are designed to provide efficient access to randomly
chosen items. Leave the other spaces blank.
_____ Sequential file
_____ Indexed file
_____ Hash file
_____ Hash table
19. Suppose you were going to construct a hash file with 20 to 25 buckets using the division hash function
discussed in the text. How many buckets should you actually use?
___________
20. List four data mining techniques.
_____________________
_____________________
_____________________
_____________________
Vocabulary (Matching) Questions
The following is a list of terms from the chapter along with descriptive phrases that can be used to produce
questions (depending on the topics covered in your course) in which the students are ask to match phrases
and terms. An example would be a question of the form, “In the blank next to each phrase, write the term
from the following list that is best described by the phrase.”
Term Descriptive Phrase
database model A conceptual organization of data within databases
schema A “road map” of a particular database’s design
DBMS Performs database operations requested by application software
SQL A popular language that implements relational database operations
relation A structural unit (with rows and columns) in a popular database model
relational operations Select, project, and join
roll back To “unwind” a transaction
commit point The time at which a DBMS guarantees that a transaction’s actions will
be reflected in a database
locking protocol A system to guard against database errors due to performing
transactions concurrently
data mining The process of extracted hidden information
data warehouse The information system to which data mining techniques are applied
hash file A storage structure that provides efficient access to randomly chosen
items
clustering A major problem when manipulating hash files
sequential file A storage structure that associates a specific order with its contents
index A means of locating a particular record within a file
key field An item used to identify records uniquely
General Format Questions
1. What information is available from a relational database containing one relation with the attributes
Name, Employee identification number, and Address that is not available from a database containing two
relations, one with attributes Name and Address and the other with attributes Address and Employee
identification number? Explain your answer.
2. Given the two relations X and Y below
X: A B Y: C D
2 s t 1
5 z r 3
w 2
draw the relation Result that would be produced by the following statements?
Temp JOIN X and Y where X.A > Y.D
Result PROJECT X.B, Y.C from Temp
3. Translate the following query into a single SQL statement.
Temp SELECT from X where A = B
Result PROJECT A, C from Temp
4. Given a relation called People whose attributes are Name, Father, and Mother (containing each
person’s name as well as the name of that person’s parents), write an SQL statement to obtain a list of all
the children of Nathan.
5. Given the relation Parts containing the attributes PartName, PartNumber, and SupplierID as
well as the relation Suppliers containing the attributes SupplierID, Address, FaxNumber, write
an SQL statement to obtain the supplier identifications and fax numbers for all the suppliers that supply the
part whose part number is X4J26.
6. Given the relation Parts containing the attributes PartName, PartNumber, and SupplierID as
well as the relation Suppliers containing the attributes SupplierID, Address, FaxNumber, write
a sequence of SELECT, PROJECT, and JOIN operations to obtain the supplier identifications and fax
numbers for all the suppliers that supply the part whose part number is X4J26.
7. If a database contained a relation containing information about individual people (name, address,
birthday, etc.) and another relation containing information about music composers (name, style, education
level, etc.), how would you extend the database’s design to include links between each individual and his or
her favorite composer?
8. Describe a scenario in which computing the total deposits in a bank while also transferring $100 from
account X to account Y would result in a final sum that is $100 too great. Then describe a scenario in
which the final sum turns out to be $100 too small.
9. Describe the wound-wait protocol.
10. Describe the distinction between a traditional database and a data warehouse.
11. Describe the distinction between class description and cluster analysis.
12. What does it mean to say that an object is persistent?