Chapter 4 Flashcards

1
Q

When you are given a set of tables and asked to create a database to store their data, the first step is to assess the tables’ structure and content.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The first step in assessing table structure is to count rows and examine columns.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

To count the number of rows in a table, use the SQL construct COUNT(ROWS).

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

To determine the number and type of columns in a table, use the SQL construct COUNT(*).

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

To limit the number of rows retrieved from a table, use the SQL TOP keyword.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

When examining data values as a part of assessing table structure, you should try to determine two types of dependencies: functional dependencies and functional dependencies.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

When examining data values as a part of assessing table structure, you should try to determine three types of keys: the primary key, any candidate keys and any foreign keys.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The second step in assessing table structure is to examine data values and determine dependencies and keys.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

When examining data values as a part of assessing table structure, you should try to determine functional dependencies.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

When examining data values as a part of assessing table structure, you should try to determine multivalued dependencies.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

When examining data values as a part of assessing table structure, you should try to determine the table’s primary key.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

When examining data values as a part of assessing table structure, there is no need to try to determine candidate keys other than the table’s primary key.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

When examining data values as a part of assessing table structure, there is no need to try to determine foreign keys.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The third step in assessing table structure is to check the validity of presumed referential integrity constraints.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The elimination of modification anomalies and the reduction of duplicated data are advantages of normalization.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Database design varies depending on whether you’re building an updatable database or a read-only database.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Normalization eliminates modification anomalies and data duplication.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

The presence of one or more foreign keys in a relation means that we cannot eliminate duplicated data in that table.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Normalization requires applications to use more complex SQL since they will need to write subqueries and joins to recombine data stored in separate relations.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Relations are sometimes left unnormalized to improve performance.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Relations in BCNF have no modification anomalies in regard to functional dependencies.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

A defining requirement for BCNF is that every determinant must be a candidate key.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

The SQL INSERT statement can be used to populate normalized tables.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

The SQL DELETE TABLE statement can be used to remove unneeded tables after the normalized tables are created and populated.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

SQL statements that can be used to create referential integrity statements for normalized tables are created during the normalization process.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

The standard sales order/line item pattern is a classic example of unneeded normalization.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Multivalued dependencies create anomalies so serious that multivalued dependencies must always be eliminated.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Writing SQL subqueries and joins against normalized tables is simple compared to the code that must be written to handle anomalies from multivalued dependencies.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

To eliminate multivalued dependencies, normalize your tables so that they are all in BCNF.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

Creating a read-only database is a job often given to beginning database professionals.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

Read-only databases are often updated.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

Design guidelines and priorities are the same whether you’re working with an updatable database or a read-only database.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

Normalization is an advantage for a read-only database.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Denormalization is the process of joining previously normalized tables back together.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

Denormalization reduces the complexity of the SQL statements needed in an application to read required data.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

Denormalization is simple—join the data together and store it in a table.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

Read-only databases seldom use more than one copy of a set of same data.

A

False

38
Q

Read-only databases often use several copies of a set of the same data, where each copy is modified for a specific use.

A

True

39
Q

Multivalued dependencies show up under a different name as the multivalued, multicolumn problem.

A

True

40
Q

The multivalued, multicolumn problem occurs when a set of columns are used to store data that should actually be in one column.

A

True

41
Q

One situation created by the multivalued, multicolumn problem is that the maximum number of data values for an attribute is limited.

A

True

42
Q

If you have a table with a set of columns named “Child01”, “Child02” and “Child03”, the table has the multivalued, multicolumn problem.

A

True

43
Q

When you are creating a database from existing data, you will have only minor problems with inconsistent values.

A

False

44
Q

An inconsistent values problem is created when different users have coded the same data entries differently.

A

True

45
Q

The problem of misspelled data entries is an entirely different problem than the inconsistent values problem.

A

False

46
Q

You are creating a BOAT table using existing data from multiple sources, and you find that you have “power boat blue”, “boat, power, blue” and “blue power boat” as data values for the same column. This is an example of the inconsistent values problem.

A

True

47
Q

A missing value is called a null value.

A

True

48
Q

Null values are a problem because they are ambiguous.

A

True

49
Q

A null value in a column may indicate that there is no appropriate value for that attribute.

A

True

50
Q

A null value in a column may indicate that there is an appropriate value for that attribute, but it is unknown.

A

True

51
Q

A null value in a column may indicate that there is an appropriate value for that attribute, and although the value is known no one has entered the value into the database.

A

True

52
Q

Most DBMS products will let you define a primary key on a column that contains null values.

A

False

53
Q

The SQL IS NULL keyword can be used to count the number of nulls in a column.

A

True

54
Q

General-purpose remarks columns rarely contain important data

A

False

55
Q

The problem with a general-purpose remarks column is that the data it contains are likely to be verbal, inconsistent and stored in a verbose manner.

A

True

56
Q

If you see a column name Notes, it is likely that this is a general-purpose remarks column.

A

True

57
Q

When you are given a set of tables and asked to create a database to store their data, the first step is to ________.

A

assess the existing tables’ structure and content

58
Q

The first step in assessing table structure includes ________.

A

counting rows and examining columns

59
Q

The second step in assessing table structure includes ________.

A

examining data values

60
Q

During the second step of assessing table structure, you are trying to determine ________.

A

multivalued dependencies, functional dependencies, and foreign keys

61
Q

During the second step of assessing table structure, you are trying to determine ________.

A

primary keys, candidate keys and foreign keys

62
Q

To count the number of rows in a table, use the SQL construct ________.

A

SELECT COUNT(*)

63
Q

The SQL function COUNT ________.

A

counts the number of rows in a table

64
Q

To limit the number of rows retrieved from a table, use the SQL construct ________.

A

SELECT TOP n *

65
Q

The SQL keyword TOP ________.

A

limits the number of rows retrieved from a table

66
Q

You have been given two tables, CUSTOMER and SALE. You want to check the referential integrity constraint:

SALE.CustomerNumber must exist in CUSTOMER.CustomerNumber

You run the following SQL query:

SELECT	CustomerNumber
FROM	SALE
WHERE	CustomerNumber NOT IN
	(SELECT	CustomerNumber
	FROM	SALE, CUSTOMER
	WHERE	SALE.CustomerNumber = CUSTOMER.CustomerNumber);

What is shown in the results of this query?

A

All values of CustomerNumber that violate the constraint.

67
Q

The advantages of normalization include ________.

A

the elimination of modification anomalies

68
Q

The disadvantages of normalization include ________.

A

more complex SQL for multitable subqueries and joins

69
Q

The presence of one or more foreign keys in a relation prevents ________.

A

the elimination of duplicated data

70
Q

Anomalies caused by functional dependencies can be eliminated by putting tables into ________.

A

BCNF

71
Q

The defining characteristic of BCNF is that a table is in BCNF if ________.

A

all determinants are candidate keys

72
Q

A classic example of unneeded normalization is when we are dealing with ________.

A

ZIP codes

73
Q

Unlike the anomalies from functional dependencies, the anomalies from ________ are so serious that they should always be eliminated.

A

multivalued dependencies

74
Q

Read-only databases are used for ________.

A

querying and reporting

75
Q

For a number of reasons, ________ is not often an advantage for a read-only database.

A

normalization

76
Q

________ is the process of joining two or more tables and storing the result as a single table.

A

Denormalization

77
Q

An advantage of denormalization is ________.

A

faster querying and less complex SQL in application code

78
Q

A table designed to store PhoneNumber01, PhoneNumber02 and PhoneNumber03 contains ________.

A

the multivalued, multicolumn problem

79
Q

A form of multivalued dependency is found in ________.

A

the multivalued, multicolumn problem

80
Q

When a table is created using existing data from multiple sources, you are likely to find that the different sources code data in slightly different ways. This is an example of ________.

A

the inconsistent values problem

81
Q

You are creating a PRODUCT table using existing data from multiple sources. Examining the data, you find that you have “large red hat”, “large hat, red”, “red hat large” and “hat, large, red.” This is an example of ________.

A

the inconsistent values problem

82
Q

The problem of misspelled data entries is really the same as ________.

A

the inconsistent values problem

83
Q

When a table is created using existing data from multiple sources, you are likely to find that some data values have never been provided. This is an example of ________.

A

the missing values problem

84
Q

When a table is created using existing data from multiple sources, you are likely to find that some data values have never been provided. This is an example of ________.

A

the missing values problem

85
Q

Reviewing the work done on a table that was created using existing data from multiple sources, you are likely to find that some data values that were provided were never entered into the table. This is an example of ________.

A

the missing values problem

86
Q

A missing value is called a(n) ________.

A

null value

87
Q

A null value can indicate which of the following conditions?

A

The value is inappropriate, The value is appropriate but unknown, and The value is appropriate and known, but not entered into the database

88
Q

To check for null values in a column in a table, use the SQL phrase ________.

A

IS NULL

89
Q

The SQL keyword IS NULL can be used to ________.

A

count the number of null values in a column

90
Q

Reviewing the work done on a table that was created using existing data from multiple sources, you find that a column name Remarks has been included, and it is populated with inconsistent and verbose verbal data. This is an example of ________.

A

the general-purpose remarks column problem