Uploaded by Sofia Laalaoui

dbp11e tif ch03

advertisement
Database Processing, 11e (Kroenke)
Chapter 3: The Relational Model and Normalization
1) All relations are tables, but not all tables are relations.
Answer: TRUE
Diff: 1
Page Ref: 96
2) A relation is a three-dimensional table.
Answer: FALSE
Diff: 2
Page Ref: 97-98 Fig 3-4
3) A characteristic of a relation is that the cells of the relation hold a single value.
Answer: TRUE
Diff: 1
Page Ref: 97-98 Fig 3-4
4) A characteristic of a relation is that the rows of a relation may hold identical values.
Answer: FALSE
Diff: 2
Page Ref: 97-98 Fig 3-4
5) The columns of a relation are sometimes called "tuples."
Answer: FALSE
Diff: 1
Page Ref: 98-99 Fig 3-9
6) A tuple is a group of one or more columns that uniquely identifies a row.
Answer: FALSE
Diff: 1
Page Ref: 98-98 Fig 3-9
7) Attribute Y is functionally dependent on attribute X if the value of attribute X determines the
value of Y.
Answer: TRUE
Diff: 2
Page Ref: 100
8) The functional dependency noted as A → B means that the value of A can be determined from
the value of B.
Answer: FALSE
Diff: 1
Page Ref: 100-101
9) In the functional dependency shown as A → B, B is the determinant.
Answer: FALSE
Diff: 2
Page Ref: 100
10) Functional dependencies can involve groups of attributes.
Answer: TRUE
Diff: 1
Page Ref: 100-101
1
Copyright © 2010 Pearson Education, Inc.
11) A determinant of a functional dependency may or may not be unique in a relation.
Answer: TRUE
Diff: 2
Page Ref: 101-104
12) A row can be uniquely identified by a key.
Answer: TRUE
Diff: 1
Page Ref: 104
13) A key can be composed of a group of attributes taken together.
Answer: TRUE
Diff: 1
Page Ref: 104
14) It is possible to have a relation that does not have a key.
Answer: FALSE
Diff: 3
Page Ref: 104
15) A relation can have only one candidate key.
Answer: FALSE
Diff: 2
Page Ref: 104-105
16) Surrogate keys usually slow performance.
Answer: FALSE
Diff: 2
Page Ref: 105
17) Surrogate keys are normally not shown on forms or reports.
Answer: TRUE
Diff: 1
Page Ref: 105
18) A constraint that requires an instance of an entity to exist in one relation before it can be
referenced in another relation is called an insertion anomaly.
Answer: FALSE
Diff: 3
Page Ref: 105-106
19) A referential integrity constraint limits the values of a foreign key.
Answer: TRUE
Diff: 2
Page Ref: 105-106
20) If a table meets the minimum definition of a relation, it has an effective or appropriate
structure.
Answer: FALSE
Diff: 2
Page Ref: 107
21) Undesirable consequences of changing the data in a relation are called "modification
anomalies."
Answer: TRUE
Diff: 2
Page Ref: 106-107
2
Copyright © 2010 Pearson Education, Inc.
22) A deletion anomaly exists when deleting data about one entity results in the loss of data
about another entity.
Answer: TRUE
Diff: 1
Page Ref: 106-107
23) Relations are classified into "normal forms" based on the types of modification anomalies
that they are vulnerable to.
Answer: TRUE
Diff: 3
Page Ref: 107-108 Fig 3-12
24) Any table that meets the definition of a relation is in 2NF.
Answer: FALSE
Diff: 1
Page Ref: 107, 108
25) A relation is in Boyce-Codd Normal Form (BCNF) if every determinant is a candidate key.
Answer: TRUE
Diff: 2
Page Ref: 109
26) The essence of normalization is taking a relation that is not in BCNF and breaking it into
multiple relations such that each one is in BCNF.
Answer: TRUE
Diff: 2
Page Ref: 110 Fig 3-13
27) Breaking a relation into two relations may create the need for a referential integrity
constraint to be defined between the two relations.
Answer: TRUE
Diff: 2
Page Ref: 110 Fig 3-13
28) A multivalued dependency exists when a determinant is matched to a set of values.
Answer: TRUE
Diff: 3
Page Ref: 117
29) The multivalued dependency noted as A → → B, means that the value of A determines a set
of values of B.
Answer: TRUE
Diff: 1
Page Ref: 117
30) A relation is in 4NF when multivalued dependencies are isolated in their own relation.
Answer: TRUE
Diff: 2
Page Ref: 120
3
Copyright © 2010 Pearson Education, Inc.
31) A relation ________.
A) has rows containing data about an entity
B) has columns containing data about attributes of the entity
C) has cells that hold only a single value
D) has no two identical rows
E) All of the above.
Answer: E
Diff: 1
Page Ref: 96-98 Fig 3-4
32) In a relation ________.
A) entities in a column vary as to kind
B) the order of the columns is important
C) the order of the rows is unimportant
D) more than one column can use the same name
E) All of the above.
Answer: C
Diff: 1
Page Ref: 96-98 Fig 3-4
33) A relation is also known as a(n) ________.
A) table
B) tuple
C) relationship
D) attribute
E) field
Answer: A
Diff: 1
Page Ref: 98-99 Fig 3-9
34) A tuple is also known as a(n) ________.
A) table
B) relation
C) row
D) field
E) file
Answer: C
Diff: 2
Page Ref: 98-99 Fig 3-9
35) An attribute is also known as a(n) ________.
A) table
B) relation
C) row
D) field
E) file
Answer: D
Diff: 2
Page Ref: 98-99 Fig 3-9
4
Copyright © 2010 Pearson Education, Inc.
36) Saying that two entities are functionally dependent means that ________.
A) the entities are always connected by a mathematical equation
B) for one of the entities, if we are given the value of that entity, we can determine the value of
one other entity
C) for both of the entities, if we are given the value of that entity, we can determine the value of
one other entity
D) the functional dependency will have to be removed through normalization
E) All of the above.
Answer: B
Diff: 2
Page Ref: 100-101
37) Given the functional dependency A → (B, C), A is a(n) ________.
A) independent variable
B) dependent variable
C) determinant
D) composite determinant
E) C and D
Answer: C
Diff: 2
Page Ref: 100-101
38) Given the functional dependency (A, B) → C, (A, B) is a(n) ________.
A) independent variable
B) dependent variable
C) determinant
D) composite determinant
E) C and D
Answer: E
Diff: 3
Page Ref: 100-101
39) Given the functional dependency (A, B) → C, then ________.
A) A → B
B) A → C
C) B → A
D) B → C
E) None of the above is correct.
Answer: E
Diff: 2
Page Ref: 100-101
40) Which of the following is true about the functional dependency A → (X, Y)?
A) X is functionally dependent on A.
B) A determines Y.
C) A is a determinant.
D) X and Y are functionally dependent on A.
E) All of the above.
Answer: E
Diff: 3
Page Ref: 100-101
5
Copyright © 2010 Pearson Education, Inc.
41) Which of the following is true about the functional dependency (A, B) → (C, D)?
A) A is the determinant of C.
B) A and B together are determined by C and D together.
C) A and B together determine D.
D) C and D together determine A.
E) A determines B.
Answer: C
Diff: 3
Page Ref: 100-101
42) The only reason(s) for having relations is to ________.
A) store instances of functional dependencies
B) store equation components
C) store equation results
D) B and C
E) A, B and C
Answer: A
Diff: 3
Page Ref: 101
43) A combination of one or more columns used to identify particular rows in a relation is a(n)
________.
A) record
B) field
C) key
D) tuple
E) dependency
Answer: C
Diff: 1
Page Ref: 104
44) A combination of two or more columns used to identify particular rows in a relation is a(n)
________.
A) record
B) field
C) composite key
D) foreign key
E) surrogate key
Answer: C
Diff: 1
Page Ref: 104
45) A determinant that determines all the other columns in a relation is a(n) ________.
A) record
B) field
C) foreign key
D) candidate key
E) surrogate key
Answer: D
Diff: 1
Page Ref: 104-105
6
Copyright © 2010 Pearson Education, Inc.
46) When designing a database, one of the candidate keys in a relation is selected as the
________.
A) composite key
B) primary key
C) foreign key
D) surrogate key
E) dependency
Answer: B
Diff: 1
Page Ref: 105
47) An artificial column added to a relation to serve as the primary key is a(n) ________.
A) composite key
B) candidate key
C) foreign key
D) surrogate key
E) dependency
Answer: D
Diff: 1
Page Ref: 105
48) A key consisting of one or more columns that is a primary key in another relation is a(n)
________.
A) composite key
B) candidate key
C) foreign key
D) surrogate key
E) dependency
Answer: C
Diff: 1
Page Ref: 105-106
49) Referential integrity constraints are used to limit the possible values of a(n) ________.
A) composite key
B) candidate key
C) foreign key
D) surrogate key
E) dependency
Answer: C
Diff: 1
Page Ref: 105-106
50) A(n) ________ is used to limit the possible values of a(n) foreign key.
A) composite key
B) surrogate key
C) functional dependency
D) referential integrity constraint
E) normal form
Answer: D
Diff: 2
Page Ref: 105-106
7
Copyright © 2010 Pearson Education, Inc.
51) Normalization is a process used to deal with which of the following modification anomalies?
A) Insertion anomaly
B) Update anomaly
C) Deletion anomaly
D) A and B
E) A, B and C
Answer: E
Diff: 1
Page Ref: 106-107
52) If the removal of facts about one entity results in the unintentional lose of data about another
entity, this is referred to as a(n) ________.
A) normalization anomaly
B) insertion anomaly
C) update anomaly
D) deletion anomaly
E) removal anomaly
Answer: D
Diff: 2
Page Ref: 106-107
53) Suppose that you need to update one value of the column SalesCost in a relation. The way
the relation is constructed, this value actually needs to be changed in three different rows.
However, you only change the value in two of the rows. You have just created an a(n) ________.
A) normalization anomaly
B) insertion anomaly
C) update anomaly
D) deletion anomaly
E) removal anomaly
Answer: C
Diff: 2
Page Ref: 106-107
54) A table that meets the definition of a relation is in ________.
A) First Normal Form
B) Second Normal Form
C) Third Normal Form
D) Boyce-Codd Normal Form
E) Fourth Normal Form
Answer: A
Diff: 1
Page Ref: 107,108
55) A relation is in Boyce-Codd normal form if ________.
A) every determinant is a candidate key
B) every determinant is a primary key
C) every attribute is a candidate key
D) there is more than one candidate key
E) there is more than one primary key
Answer: A
Diff: 2
Page Ref: 109-110 Fig 3-13
8
Copyright © 2010 Pearson Education, Inc.
56) If a table is designed so that every determinant is a candidate key, then that relation is in
________.
A) First Normal Form
B) Second Normal Form
C) Third Normal Form
D) Boyce-Codd Normal Form
E) Fourth Normal Form
Answer: D
Diff: 2
Page Ref: 109-110 Fig 3-13
57) If a relation is in BCNF, and each multivalued dependency has been moved to a relation of
its own, then the first relation is in ________.
A) First Normal Form
B) Second Normal Form
C) Third Normal Form
D) Boyce-Codd Normal Form
E) Fourth Normal Form
Answer: E
Diff: 2
Page Ref: 117-120
58) A relation is in fourth normal form if it is in BCNF and it has no ________.
A) transitive dependencies
B) multivalued dependencies
C) partial dependencies
D) deletion dependencies
E) referential integrity conflicts
Answer: B
Diff: 2
Page Ref: 117-120
59) A relation is in domain/key normal form if ________.
A) every key of the relation is a logical consequence of the definition of constraints and
determinants
B) every key of the relation is a logical consequence of the definition of constraints and domains
C) every constraint on the relation is a logical consequence of the definition of keys and
determinants
D) every constraint on the relation is a logical consequence of the definition of keys and domains
E) every domain of the relation is a logical consequence of the definition of keys and constraints
Answer: D
Diff: 2
Page Ref: 120-121
60) In general, each relation should have ________.
A) one and only one theme
B) one or more themes
C) exactly two themes
D) one or two themes
E) exactly three themes
Answer: A
Diff: 1
Page Ref: 112
9
Copyright © 2010 Pearson Education, Inc.
61) A(n) ________ is a table composed of columns and rows.
Answer: relation
Diff: 1
Page Ref: 96-98 Fig 3-4
62) In relational terms as defined by E.F. Codd, a row is called a(n) ________.
Answer: tuple
Diff: 1
Page Ref: 98
63) In relational terms as defined by E.F. Codd, a column is called a(n) ________.
Answer: attribute
Diff: 1
Page Ref: 98
64) A(n) ________ is a relationship between attributes such that if we know the value of one
attribute, we can determine the value of the other attribute.
Answer: functional dependency
Diff: 1
Page Ref: 100
65) If by knowing the value of A we can find the value of B, then we would say that B is
________ on A.
Answer: functionally dependent
Diff: 2
Page Ref: 100
66) In functional dependencies, the attribute whose value is known or given is referred to as the
________.
Answer: determinant
Diff: 2
Page Ref: 100
67) Given the functional dependency (A, B) → C, the attributes (A, B) are referred to as a
________.
Answer: composite determinant
Diff: 2
Page Ref: 101
68) Given the functional dependency A → (B, C), then it is true that ________ and ________.
Answer: A → B; A → C
Diff: 3
Page Ref: 101
69) Given the functional dependency (A, B) → C, then it is not true that ________ and
________.
Answer: A → C; B → C
Diff: 3
Page Ref: 101
70) Given the functional dependency A → B, it is not necessarily true that ________.
Answer: B → A
Diff: 3
Page Ref: 101
10
Copyright © 2010 Pearson Education, Inc.
71) A(n) ________ is a combination of one or more columns that is used to identify particular
rows in a relation.
Answer: key
Diff: 1
Page Ref: 104
72) A(n) ________ is a group of attributes that uniquely identifies a row.
Answer: composite key
Diff: 1
Page Ref: 104
73) A(n) ________ is one of a group of keys that may serve as the primary key in a relation.
Answer: candidate key
Diff: 1
Page Ref: 104-105
74) A(n) ________ is a candidate key that has been selected to uniquely identify rows in a
relation.
Answer: primary key
Diff: 1
Page Ref: 105
75) A(n) relation or table has only one ________.
Answer: primary key
Diff: 1
Page Ref: 105
76) A(n) ________ is an artificial column that is added to a relation to be its primary key.
Answer: surrogate key
Diff: 1
Page Ref: 105
77) A(n) ________ is one or more columns in one relation that also is the primary key in another
table.
Answer: foreign key
Diff: 1
Page Ref: 105-106
78) A(n) ________ is used to make sure the values of a foreign key match a valid value of a
primary key.
Answer: referential integrity constraint
Diff: 1
Page Ref: 105-106
79) For some relations, changing the data can have undesirable consequences called ________.
Answer: modification anomalies
Diff: 2
Page Ref: 106-107
80) Relations are categorized into ________ where the categorization is based on the problems
the relation has.
Answer: normal forms
Diff: 2
Page Ref: 107-108
81) Any table that meets the definition of a(n) ________ is said to be in first normal form.
Answer: relation
Diff: 1
Page Ref: 107, 108
11
Copyright © 2010 Pearson Education, Inc.
82) If a table is a relation then it is in ________.
Answer: 1NF
Diff: 1
Page Ref: 107, 108
83) A defining requirement for ________ normal form is that every determinant must be a
candidate key.
Answer: Boyce-Codd
Diff: 2
Page Ref: 109-110 Fig 3-13
84) A relation is in BCNF if every ________ is a candidate key.
Answer: determinant
Diff: 2
Page Ref: 109-110 Fig 3-13
85) A relation is in BCNF if every determinant is a(n) ________.
Answer: candidate key
Diff: 2
Page Ref: 109-110 Fig 3-13
86) Domain/key normal form requires that every ________ be a logical consequence of the
definition of domains and keys.
Answer: constraint
Diff: 2
Page Ref: 120-121
87) A relation that is in ________ normal form is assured to be free from all anomalies.
Answer: domain/key
Diff: 2
Page Ref: 120-121
88) Every time we break up a relation during the normalization process, we may have to create
________ constraints.
Answer: referential integrity
Diff: 2
Page Ref: 110 Fig 3-13
89) A relation is in 4NF if it is in BCNF and it has no ________.
Answer: multivalued dependencies
Diff: 2
Page Ref: 117-120 Fig 3-13
90) When designing or normalizing relations, each relation should have only one ________.
Answer: theme
Diff: 1
Page Ref: 112
12
Copyright © 2010 Pearson Education, Inc.
91) What is a functional dependency? Give an example not used in the text.
Answer: We say that a functional dependency exists when the value of one or more attributes
determines the value of another attributes. For example, suppose we have a six-sided die
numbered and colored as follows:
Number
1
2
3
4
5
6
Color
Red
Blue
White
Green
Green
Green
In this case, Number functionally determines Color, written as Number → Color. Then, if we
know the Number is 3, we know the Color is White. Note that the reverse is not true Color does
not determine Number since if we are given the Color Green the number could be 4, 5, or 6. The
attribute on the left-hand side of the dependency is called the "determinant." Thus, Number is a
determinant. Although equations can be expressed as functional dependencies [as when the
equation TotalCost = NumberSold * ItemCost is written as the functional dependency
(NumberSold, ItemCost) → TotalCost] functional dependencies are not equations. Also note that
a determinant can have more than one attribute [as does (NumberSold, ItemCost) in the last
example] and when it does it is called a composite determinant.
Diff: 2
Page Ref: 100-101
92) Describe the requirements that a table must meet to qualify as a relation.
Answer: In order for a table to meet the requirements of a relation, it must satisfy certain
conditions. First, the rows contain data about an entity or some portion of the entity. Second, the
columns contain data that represent attributes of the entity. Third, each column must contain the
same kind of data for all rows. Fifth, each column must have a unique name. Sixth, the cells must
contain single values no group or array values are allowed. Seventh, the order of the columns
and the rows is insignificant. Finally, the rows must be unique.
Diff: 1
Page Ref: 96-98 Fig 3-4
93) Explain the terms relation, tuple, and attribute.
Answer: The terms relation, tuple, and attribute are used primarily by database theoreticians.
These terms are synonymous with the terms table, row, and column, respectively, in regards to
a relational database. They are also equivalent to the terms file, record, and field, which tend to
be used by many traditional data processing professionals.
Diff: 1
Page Ref: 98-99 Fig 3-9
94) Distinguish between the primary key and a candidate key.
Answer: Both the primary key and a candidate key can uniquely identify the rows in a table. The
primary key is the candidate key that is chosen by the database designer, working with the users,
to uniquely identify rows and to represent relationships. Although any candidate key could, by
definition, be selected to act as the primary key, the choice of primary key is often based on
design decisions such as the amount of foreign key data that would be generated.
Diff: 2
Page Ref: 104-105
13
Copyright © 2010 Pearson Education, Inc.
95) Briefly describe the various tasks of the primary key.
Answer: The primary key is used for four primary tasks. First, it is used to uniquely identify the
rows in a table. Second, it is used to represent rows in relationships. Third, most DBMS products
use the values of the primary key to organize the storage of the relation. Finally, primary keys
are used in indexes and other structures to improve performance for search operations.
Diff: 2
Page Ref: 105
96) Explain the relationships among primary keys and functional dependencies.
Answer: Relations store instances of functional dependencies in their rows. All primary keys
represent a functional dependency, since each primary key functionally determines the entire
row. Since the primary key determines the entire row, if a primary key were duplicated in a
relation, then the entire row would have to be duplicated. Since a relation can contain no
duplicate rows, the primary key must be unique.
Diff: 3
Page Ref: 96-101 Fig 3-4
97) Explain the concept of a foreign key.
Answer: To implement a relationship within a relational database, the primary key of one
relation is placed as an attribute in another relation. This attribute is called a foreign key in the
second relation because it is the primary key of a relation that is foreign to the table in which the
field resides.
Diff: 2
Page Ref: 105-106
98) Explain the concept of a surrogate key.
Answer: A surrogate key is an artificial key that is created to act as the primary key for a
relation. The surrogate key is a unique, numeric value that is appended to the relation. Surrogate
keys are used in situations when no suitable primary key exists within the user data, or when all
available primary keys within the data are too cumbersome for an efficient design. Surrogate key
values have no meaning to the users and are normally hidden on all forms, reports, and displays.
Most DBMS products have the ability to automatically generate values for surrogate keys as
needed.
Diff: 1
Page Ref: 105
99) Explain the essence of normalization that is implemented through the use of normal forms.
Answer: The essence of normalization is to create relations that contain data on a single theme,
and for each row in a relation to contain all the data about that theme for a given entity. This
essence is implemented in the normal forms by taking a relation that contains data on more than
one theme and splitting it into multiple relations that each contain data on a single theme. The
different normal forms protect against the occurrence of modification anomalies. In practice,
making sure all relations are in Boyce-Codd Normal Form (BCNF), or in Fourth Normal Form
(4NF) if multivalued dependencies are found, insures high reliability of the database.
Diff: 3
Page Ref: 106-110, 112
14
Copyright © 2010 Pearson Education, Inc.
100) Explain the steps in the process of putting a relation into Boyce-Codd Normal Form
(BCNF).
Answer: The steps are:
(1) Identify all functional dependencies in the relation.
(2) Identify every candidate key in the relation.
(3) Check to see if all determinants are candidate keys.
a. If so, the relation is in BCNF-STOP.
b. If not, then:
i. Move the columns of the functional dependency of the determinant that is not a
candidate key to a new relation.
ii. Make the determinant of that functional dependency the primary key of the new
relation.
iii. Leave a copy of the determinant in the original relation as a foreign key.
iv. Create a referential integrity constraint between the relations.
NOTE: If there is more than one functional dependency that needs to be moved, move the
functional dependency with the most columns first.
(4) Repeat step (3) until you reach STOP.
Diff: 1
Page Ref: 110 Fig 3-13
15
Copyright © 2010 Pearson Education, Inc.
Download