murachs_php_4E_chapter16
rtf
keyboard_arrow_up
School
Southern Illinois University, Carbondale *
*We aren’t endorsed by this school
Course
405
Subject
Information Systems
Date
Nov 24, 2024
Type
rtf
Pages
6
Uploaded by dustinmyers
Chapter 16: How to design a database
Murach's PHP and MySQL (4th Ed.)
MULTIPLE CHOICE
1.
To model a database on a real-world system, you typically represent each real-world entity as a/an
________________.
a.
object
c.
table
b.
class
d.
data element
ANS: C
2.
If two tables have a one-to-many relationship, you may need to add a ________________ column to
the table on the “many” side.
a.
primary key
c.
linking key
b.
foreign key
d.
index
ANS: B
3.
If two tables have a many-to-many relationship, you need to define a/an ________________ table that
relates their rows.
a.
linking
c.
central
b.
correlation
d.
relative
ANS: A
4.
Referential integrity means that the ________________ between tables are maintained correctly.
a.
foreign keys
c.
relationships
b.
primary keys
d.
indexes
ANS: C
5.
To normalize a data structure, you
a.
apply the steps for designing a data structure
b.
identify the data elements
c.
identify the tables and assign columns
d.
apply the normal forms in sequence
ANS: D
6.
SELECT statements for data structures that are normalized to the fourth or fifth normal form typically
require more ________________ than denormalized data structures.
a.
subqueries
c.
WHERE clauses
b.
joins
d.
grouping
ANS: B
7.
To speed performance when searching and joining tables, you can use ____________.
a.
primary keys
c.
joins
b.
foreign keys
d.
indexes
ANS: D
8.
With recent versions of MySQL, you can use ________________ constraints to enforce referential
integrity.
a.
referential
c.
foreign key
b.
relative
d.
primary key
ANS: C
9.
Which of the following diagrams best represents the relationship between a table of customers and a
table of orders placed by customers?
a.
b.
c.
d.
ANS: B
10.
Every row in a table should be uniquely identified by a ________________ key.
a.
primary
c.
confusing
b.
parameterized
d.
imaginary
ANS: A
11.
Which of the following diagrams best represents the relationship between a table of students and a
table of classes for which the student is registered?
a.
b.
c.
d.
ANS: C
Figure 16-1
12.
(Refer to figure 16-1.) Which column or columns in each table should be defined as the primary key?
a.
Orders: OrderID
OrderLineItems: OrderID
Products: ProductID
b.
Orders: OrderID and OrderDate
OrderLineItems: OrderID and OrderSequence
Products: ProductID
c.
Orders: OrderID
OrderLineItems: OrderID and OrderSequence
Products: ProductID
d.
Orders: OrderID
OrderLineItems: OrderID, OrderSequence, and ProductID
Products: ProductID and ProductName
ANS: C
13.
(Refer to figure 16-1.) Which column or columns in each table are foreign keys?
a.
Orders: none
OrderLineItems: OrderID and ProductID
Products: none
b.
Orders: OrderID
OrderLineItems: OrderID and OrderSequence
Products: ProductID
c.
Orders: none
OrderLineItems: OrderID and OrderSequence
Products: none
d.
Orders: OrderID
OrderLineItems: OrderSequence
Products: ProductID
ANS: A
14.
When you identify the data elements in a new database, you typically subdivide data elements into
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
a.
the largest practical components
b.
the smallest practical components
c.
components that can be easily parsed each time you use them
ANS: B
15.
Which of the following ensures that relationships between tables are maintained correctly?
a.
metadata
c.
Structured Query Language (SQL)
b.
referential integrity
d.
flux capacitor
ANS: B
16.
A(n) ________________ provides a way for a database management system to locate information
more quickly.
a.
anomaly
c.
slow computer
b.
index
d.
large monitor
ANS: B
17.
To be in the first normal form, each cell in a table must contain
a.
a unique value
c.
a single, scalar value
b.
a non-unique value
d.
a non-redundant value
ANS: C
18.
Which of the following is a formal process used to separate data into related tables to avoid data
redundancy?
a.
normalization
c.
referential integrity
b.
serialization
d.
data mining
ANS: A
19.
Which of the following does NOT violate the referential integrity of a database?
a.
inserting a new row into a table with a foreign key that doesn’t match a primary key in the
related table
b.
updating a foreign key with a value that doesn’t match a primary key in the related table
c.
updating a primary key in a primary key table without also updating the foreign keys for
the related rows in all related tables
d.
deleting a row in a foreign key table without deleting the related row in the related
primary key table
ANS: D
20.
To apply the second normal form, you move columns that don’t depend on the entire primary key to
another table and establish a relationship between the two tables. This
a.
reduces redundancy but makes maintenance more difficult
b.
reduces redundancy and makes maintenance easier
c.
increases redundancy but makes maintenance easier
d.
increases redundancy but makes the data more consistent
ANS: B
21.
To be in the third normal form, each non-key column
a.
must depend only on the primary key
b.
must not depend on the primary key
c.
must depend on the foreign key
d.
must depend on the index
ANS: A
22.
Denormalization typically results in all but one of the following. Which one is it?
a.
larger tables
c.
more complicated SQL coding
b.
redundant data
d.
reduced performance
ANS: C
23.
It is usually not a good practice to create an index for a column when
a.
the column is a foreign key
b.
the column is frequently updated
c.
the column is frequently used in search conditions or joins
d.
the column contains a large number of unique values
ANS: B
24.
Which type of key consists of more than one field?
a.
foreign key
c.
compartmentalized key
b.
alphabetized key
d.
composite key
ANS: D
25.
A database is typically considered normalized if it is in ________________ normal form.
a.
paranormal
c.
third
b.
second
d.
first
ANS: C
26.
For a table to be in ___________ normal form, every non-key column must depend only on the
primary key.
a.
third
c.
first
b.
second
d.
zero
ANS: A
27.
________________ can result in larger tables, redundant data, and reduced performance.
a.
Normalization
c.
Refactoring
b.
Denormalization
d.
Indexing
ANS: B
28.
If two tables have a one-to-many relationship, you may need to add a _____________ column to the
table on the “many” side.
a.
foreign key
c.
invisible key
b.
referential constraint
d.
numeric index
ANS: A
29.
A column in a table that can be computed from other columns contains ________________ data.
a.
useless
c.
derived
b.
denormalized
d.
indexed
ANS: C
30.
How many normal forms exist for databases?
a.
7
c.
4
b.
3
d.
2
ANS: A
31.
Unlike the tables that came with versions of MySQL before version 5.5, the InnoDB tables that are the
default for recent versions of MySQL provide for
a.
composite indexes
c.
the domain-key normal form
b.
declarative referential integrity
d.
many-to-many relationships
ANS: B
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help