You are on page 1of 19

Hands-On Database 2nd Edition Steve

Conger Test Bank


Visit to download the full and correct content document: https://testbankdeal.com/dow
nload/hands-on-database-2nd-edition-steve-conger-test-bank/
Hands-On Database, 2e (Conger)
Chapter 6 Physical Design

6.1 Multiple Choice

1) Which of the following are important to consider when choosing a database management
system?
A) Compatibility with your software and hardware
B) Hardware and software requirements
C) Familiarity and expertise of staff
D) All of the above
Answer: D
Diff: 1 Page Ref: 102,103

2) Which of the following is the term for database design adapted to the features and limitations
of the database management system?
A) Physical Design
B) Logical Design
C) Normalization
D) Referential Integrity
Answer: A
Diff: 1 Page Ref: 104

3) Every action that occurs in the database is a:


A) Database transaction
B) A query
C) Part of physical design
D) Aspect of Referential integrity
Answer: A
Diff: 2 Page Ref: 105, 106

4) Which of the following best defines the term data type?


A) The file structure of the database
B) The type of tables in a database
C) A column specification that determines what kind of data can be stored in a column
D) None of the above
Answer: C
Diff: 2 Page Ref: 106

5) Which of the following is a variable character type?


A) Int
B) Money
C) Char
D) NVarchar
Answer: D
Diff: 2 Page Ref: 107

1
Copyright © 2014 Pearson Education, Inc.
6) Which of the following is a fixed character type?
A) Int
B) Money
C) Char
D) NVarchar
Answer: C
Diff: 2 Page Ref: 105

7) Which of the following is true of a fixed character data type?


A) It always writes the same number of characters to disk
B) It is less efficient in terms of disk storage
C) It uses more processor time
D) Both A and B
Answer: D
Diff: 2 Page Ref: 107

8) Which of the following is true of a variable character data type?


A) It always writes the same number of characters to disk
B) It is less efficient in terms of disk storage
C) It uses more processor time
D) Both A and B
Answer: C
Diff: 2 Page Ref: 107

9) Which of the following is a unicode character type?


A) Int
B) Money
C) Char
D) NVarchar
Answer: D
Diff: 2 Page Ref: 107

10) Which of the following provides the best definition for unicode?
A) A 255 character set common to all computers
B) An expanded character set that includes non Latin characters
C) A character set that uses one byte per character
D) None of the above
Answer: B
Diff: 2 Page Ref: 108

2
Copyright © 2014 Pearson Education, Inc.
11) In the following entity what would be the best data type for an attribute called
"BuildingAddress"?
A) Int
B) Decimal
C) NVarchar
D) Text
Answer: C
Diff: 2 Page Ref: 107

12) Which of the following is the best data type for attribute called "ProductPrice"?
A) NVarchar
B) Decimal
C) Money
D) B or C
Answer: D
Diff: 3 Page Ref: 106

13) Which of the following data types would be best for just storing a Date?
A) Datetime
B) Time
C) Date
D) XML
Answer: C
Diff: 2 Page Ref: 106

14) Which data type would be best for storing a large image file?
A) Text
B) NVarchar
C) VarBinary(Max)
D) Big Int
Answer: C
Diff: 2 Page Ref: 107

15) Which of the following best defines the term null?


A) The absence of a value
B) Same as a 0
C) Same as an empty string
D) Invalid data
Answer: A
Diff: 2 Page Ref: 109

3
Copyright © 2014 Pearson Education, Inc.
16) An unknown or absent value is represented in a database as a(n):
A) Zero
B) Empty string
C) Null
D) All of the above
Answer: C
Diff: 2 Page Ref: 109

17) Which of the following best defines the term referential integrity?
A) Relationships among tables
B) Every foreign key must relate to an existing primary key
C) Every primary key must be unique
D) None of the above
Answer: B
Diff: 2 Page Ref: 116

18) Which of the following terms best describes the condition where every foreign key must
refer to an existing primary key?
A) Physical Design
B) Null values
C) Referential Integrity
D) All of the above
Answer: C
Diff: 1 Page Ref: 116

19) Which of the following best describes the effect of enforcing referential integrity on inserts?
A) You cannot enter data into a foreign key table unless it is related to an existing record in the
primary key table
B) You cannot remove a record from the primary key table if it has related records in the foreign
key table
C) You cannot change a primary key that has related records in a foreign key table
D) All of the above
Answer: A
Diff: 2 Page Ref: 117

20) Which of the following best describes the effect of enforcing referential integrity on deletes?
A) You cannot enter data into a foreign key table unless it is related to an existing record in the
primary key table
B) You cannot remove a record from the primary key table if it has related records in the foreign
key table
C) You cannot change a primary key that has related records in a foreign key table
D) All of the above
Answer: B
Diff: 2 Page Ref: 117

4
Copyright © 2014 Pearson Education, Inc.
21) Which of the following best describes the effect of enforcing referential integrity on updates?
A) You cannot enter data into a foreign key table unless it is related to an existing record in the
primary key table
B) You cannot remove a record from the primary key table if it has related records in the foreign
key table
C) You cannot change a primary key that has related records in a foreign key table
D) All of the above
Answer: C
Diff: 2 Page Ref: 117

22) You cannot enter data into a foreign key table unless it is related to an existing record in the
primary key table. Which action is most effected by this rule?
A) Insert
B) Update
C) Delete
D) None of the above
Answer: A
Diff: 2 Page Ref: 117

23) You cannot remove a record from the primary key table until you have removed all related
records from the foreign key table. Which action is most effected by this rule?
A) Insert
B) Update
C) Delete
D) None of the above
Answer: C
Diff: 2 Page Ref: 117

24) You cannot change a foreign key value unless the value you are changing it to already exists
in the primary key table. Which action is most effected by this rule?
A) Insert
B) Update
C) Delete
D) None of the above
Answer: B
Diff: 2 Page Ref: 117

25) Which of the following describes some of the advantages of enforcing referential integrity?
A) It prevents orphan data
B) It makes the database more difficult to use
C) It protects against bad or meaningless data
D) Both A and C
Answer: D
Diff: 2 Page Ref: 116-117

5
Copyright © 2014 Pearson Education, Inc.
26) Which of the following is true of sample data?
A) It should be complete enough to test business rules
B) It should contain some exceptions or even errors to test how the database deals with those
C) Both A and B
D) None of the above
Answer: C
Diff: 2 Page Ref: 118

27) Which of the following best defines a data dictionary?


A) A document that describes all database objects and their structure including data types
B) A glossary of database terms
C) A handbook of acronyms related to database development
D) None of the above
Answer: A
Diff: 2 Page Ref: 121

28) A document which describes database objects and their data types is called a:
A) Data Glossary
B) Schema
C) Data Dictionary
D) None of the above
Answer: C
Diff: 2 Page Ref: 121

29) Which of the following is true of nulls?


A) By default they are excluded from summaries and averages
B) They cannot be used in calculations
C) They cannot be compared to other values
D) All of the above
Answer: D
Diff: 2 Page Ref: 109-110

30) When you design a table you should allow nulls if:
A) A value is not required by business rules
B) The value could be unknown at a particular point of time
C) Both A and B
D) None of the above
Answer: C
Diff: 2 Page Ref: 109-110

31) When you design tables you should not allow nulls if:
A) The value is required by business rules
B) You can put in an out of bounds value like 999
C) The value could remain unknown at a particular point of time
D) None of the above
Answer: A
Diff: 2 Page Ref: 109-110
6
Copyright © 2014 Pearson Education, Inc.
32) Which of the following shows how you would begin to make a table in SQL?
A) CREATE VIEW
B) CREATE TABLE
C) MAKE TABLE
D) SELECT
Answer: B
Diff: 1 Page Ref: 110

33) In the SQL Management Studio you can create relationships by dragging between entities in
the:
A) Database Diagram
B) Table Design
C) Query window
D) Object Explorer
Answer: A
Diff: 2 Page Ref: 114-116

34) Which of the following data types are depreciated?


A) Varchar
B) NVarchar
C) Text
D) Bit
Answer: C
Diff: 4 Page Ref: 107

35) What is the maximum number of characters (excluding MAX) of a NVarchar of NChar data
type?
A) 50
B) 255
C) 155
D) 100
Answer: B
Diff: 2 Page Ref: 105

36) The type of design that takes into account the limitations and features of a particular
Database Management System is called:
A) Logical Design
B) Physical Design
C) Normalization
D) Denormalization
Answer: B
Diff: 2 Page Ref: 105

7
Copyright © 2014 Pearson Education, Inc.
37) A column specification that limits the kinds of data that can be stored in that column is
called:
A) A column name
B) A foreign key
C) A data type
D) None of the above
Answer: C
Diff: 2 Page Ref: 106

38) Char and NChar represent what kinds of character types?


A) Fixed
B) Variable Length
C) Unicode
D) ASCII
Answer: A
Diff: 2 Page Ref: 107

39) Varchar and NVarchar represent what kinds of character types?


A) Fixed
B) Variable Length
C) Unicode
D) ASCII
Answer: B
Diff: 2 Page Ref: 107

40) Char and Varchar represent what kinds of character types?


A) Fixed
B) Variable Length
C) Unicode
D) ASCII
Answer: D
Diff: 2 Page Ref: 107

41) NChar and NVarchar represent what kinds of character types?


A) Fixed
B) Variable Length
C) Unicode
D) ASCII
Answer: C
Diff: 2 Page Ref: 107

8
Copyright © 2014 Pearson Education, Inc.
42) Which of the following represents unknown data in a data column?
A) Empty String
B) A zero value
C) A NULL
D) Both A and B
Answer: C
Diff: 2 Page Ref: 109

43) Which of the following ensures that a value in a foreign key column must refer to a primary
key value in the parent table?
A) Referential Integrity
B) Normalization
C) Physical design
D) None of the above
Answer: A
Diff: 2 Page Ref: 116

44) If you want to delete a record from a table that has related tables, you must:
A) Just delete the record
B) Delete all related records in the child tables before deleting the record
C) Change the key in the parent table so you can delete it
D) Change the foreign keys in the child tables so they no longer refer to the parent record to be
deleted
Answer: B
Diff: 3 Page Ref: 116

45) The NVarchar(Max) data type allows you to store:


A) No more than 255 characters
B) Large files of unicode text
C) High precision decimal numbers
D) None of the above
Answer: B
Diff: 2 Page Ref: 107

6.2 True False

1) Choosing a database management system requires a great deal of analysis.


Answer: TRUE
Diff: 1 Page Ref: 102

2) Choosing a database management system requires very little analysis.


Answer: FALSE
Diff: 1 Page Ref: 102

9
Copyright © 2014 Pearson Education, Inc.
3) When choosing a database management system you should consider system compatibility and
hardware requirements.
Answer: TRUE
Diff: 1 Page Ref: 103

4) Any action that a database takes is part of a database transaction.


Answer: TRUE
Diff: 2 Page Ref: 105

5) Only insert and update statements are part of a database transaction.


Answer: FALSE
Diff: 2 Page Ref: 105

6) Physical design is logical design adapted to the limits and features of a particular database
management system.
Answer: TRUE
Diff: 1 Page Ref: 105

7) Physical design is independent of any particular database management system.


Answer: FALSE
Diff: 1 Page Ref: 105

8) A data type is a column specification that determines what kind of data can be stored in it.
Answer: TRUE
Diff: 2 Page Ref: 106

9) A data type is just a suggestion about what kind of data can be stored in a column.
Answer: FALSE
Diff: 1 Page Ref: 106

10) Int, Decimal and Money are numeric data types.


Answer: TRUE
Diff: 1 Page Ref: 106

11) Int, Decimal and Money are character numeric types.


Answer: FALSE
Diff: 1 Page Ref: 106

12) Char and NChar are fixed length character types.


Answer: TRUE
Diff: 2 Page Ref: 107

13) Char and NChar are variable length character types.


Answer: FALSE
Diff: 2 Page Ref: 107

10
Copyright © 2014 Pearson Education, Inc.
14) Varchar and Nvarchar are variable length character types.
Answer: TRUE
Diff: 1 Page Ref: 107

15) Varchar and NVarchar are fixed length character types.


Answer: FALSE
Diff: 1 Page Ref: 107

16) Nchar and NVarchar are based on the unicode character set.
Answer: TRUE
Diff: 2 Page Ref: 107

17) Unicode is an expanded character set that contains non Latin characters.
Answer: TRUE
Diff: 1 Page Ref: 108

18) A null represents the absence of a value.


Answer: TRUE
Diff: 2 Page Ref: 109

19) A Null is the same as a 0 or an empty stirring.


Answer: FALSE
Diff: 2 Page Ref: 109

20) You should never allow nulls in a database.


Answer: FALSE
Diff: 2 Page Ref: 109

21) You should not allow nulls in columns that are critical to your business rules.
Answer: TRUE
Diff: 2 Page Ref: 109

22) You can create a table in SQL.


Answer: TRUE
Diff: 1 Page Ref: 110

23) You can only create tables in SQL.


Answer: FALSE
Diff: 1 Page Ref: 110

24) Referential integrity exists when every foreign key relates to a primary key.
Answer: TRUE
Diff: 2 Page Ref: 116

11
Copyright © 2014 Pearson Education, Inc.
25) When referential integrity is in effect you cannot delete a record in the primary key table
until you have first deleted all the related records in the foreign key table.
Answer: TRUE
Diff: 2 Page Ref: 117

26) When referential integrity is in effect you can enter anything you want on the foreign key
side of the relation.
Answer: FALSE
Diff: 2 Page Ref: 117

27) When referential integrity is in effect you can only enter records in the foreign key side of
the relation if it relates directly to a record in the primary key table.
Answer: TRUE
Diff: 2 Page Ref: 117

28) When referential integrity is in effect you cannot delete any record from the foreign key
table.
Answer: FALSE
Diff: 2 Page Ref: 117

29) When referential integrity is in effect you cannot change the value of the primary key
without also changing the value of the foreign key.
Answer: TRUE
Diff: 2 Page Ref: 117

30) When referential integrity is in effect you can only change a foreign key value to one that
exists in the primary key table.
Answer: TRUE
Diff: 2 Page Ref: 117

31) When referential integrity is in effect you can change the foreign key value to anything you
want.
Answer: FALSE
Diff: 2 Page Ref: 117

32) You should always test a database with sample data.


Answer: TRUE
Diff: 1 Page Ref: 118

33) You should always test a database by putting it directly into the production environment.
Answer: FALSE
Diff: 1 Page Ref: 118

34) Sample data should be complex enough to test the business rules.
Answer: TRUE
Diff: 1 Page Ref: 118

12
Copyright © 2014 Pearson Education, Inc.
35) It is a good idea to create a data dictionary to document the database structure.
Answer: TRUE
Diff: 1 Page Ref: 121

36) Physical design concerns itself with the location and structure of the database files itself.
Answer: TRUE
Diff: 2 Page Ref: 104

37) Variable data types take less processing time.


Answer: FALSE
Diff: 3 Page Ref: 107

38) Variable data types take more processing time.


Answer: TRUE
Diff: 3 Page Ref: 104

39) Fixed length data types use more disk space.


Answer: TRUE
Diff: 3 Page Ref: 104

40) Fixed length data types use less disk space.


Answer: FALSE
Diff: 3 Page Ref: 104

41) A data dictionary documents all the tables and their data types.
Answer: TRUE
Diff: 2 Page Ref: 121

42) Unicode is identical to ASCII coding.


Answer: FALSE
Diff: 2 Page Ref: 108

43) Sample data doesn't have to resemble the production data.


Answer: FALSE
Diff: 2 Page Ref: 120

44) Sample data should resemble the production data.


Answer: TRUE
Diff: 2 Page Ref: 120

45) Sample data should be complete enough to test all the business rules and requirements of the
database.
Answer: TRUE
Diff: 2 Page Ref: 120

13
Copyright © 2014 Pearson Education, Inc.
6.3 Essay Questions

1) What data type would you choose for each of the attributes in the following entity? Explain.

Answer: The data type for the product key depends on how the product key is designated. It
could be an NCHAR or, or if it is a surrogate key, an INT. ProductName would be best as a
VARCHAR or NVARCHAR since the length of the column could vary quite a bit. ProductType
could be a NCHAR or CHAR if the values fall into a certain length, otherwise a variable
character type might be best. ProductUnitSize could be INT if the value is numeric or NCHAR if
it is not. ProductPrice could either be decimal or money. ProductQuantity would be INT since
quantity can only be whole numbers.
Diff: 2 Page Ref: 106-107

14
Copyright © 2014 Pearson Education, Inc.
2) What data type would you choose for each of the attributes in the following entity? Explain.

Answer: The data type for BuildingKey depends on the primary key structure. If it is a surrogate
key the type would probably be INT, otherwise it could be NCHAR. BuildingName,
BuildingAddress, Building City would all be VARCHAR or NVARCHAR since they contain
character data of varying length. BuildingState could be NCHAR or CHAR with a length of 2,
assuming only the abbreviations for the state are desired. BuildingZip could also be CHAR or
NCHAR with a set length. A numeric type would not work, since some zip codes have leading
0's.
Diff: 2 Page Ref: 106-107

3) Explain the implications of enforcing referential integrity for Insert, Update and Delete
statements.
Answer: Enforcing referential integrity has an effect on three common database actions. It
forces a user to insert data in a certain order. There must be an existing value in the primary key
table before related records can be entered in the foreign key table. It also effects updates. One
cannot change a primary key that has related records in a child or foreign key table. One also
cannot update a foreign key column in the child table except to change it to the value of an
existing primary key in the primary key table. When it comes to deletes, one cannot delete a
record from a primary key table until all the related records in the foreign key table have been
deleted first.
Diff: 3 Page Ref: 117

15
Copyright © 2014 Pearson Education, Inc.
4) Explain the advantages of enforcing referential integrity.
Answer: Enforcing referential integrity prevents orphan records. For example, it prevents there
being orders in the order table that don't have a corresponding record in the Customer table.
Enforcing referential integrity prevents a database from becoming clutter with broken and
useless data.
Diff: 3 Page Ref: 116-117

5) What are the tradeoffs when choosing fixed vs. variable length character types?
Answer: Fixed character types use very little processor time. They can just be written to disk
without any additional calculation. They are, however, potentially wasteful of disk space, since
the database writes the same number of characters to disk no matter how many are actually used
by the value contained in the column. Variable character types, on the other hand, use more
processing time, since the computer must determine the length of the characters used for each
data entry. However, variable character types use disk space more effectively because they never
write more characters to disk than are actually used.
Diff: 3 Page Ref: 107

6) What are some of the things to be considered in the physical design of a database?
Answer: One of the primary factors to consider is the file structure of the database and where the
files are to be stored. Another major factor is what data types are supported by the database
management system. Each column in the design must be given the appropriate data type.
Diff: 2 Page Ref: 105

7) What are some of the most important considerations when choosing a database management
system?
Answer: One of the first things that should be considered is the database management system's
compatibility with the hardware and software of the current system. If a system is incompatible
then the company must evaluate if the database management system is worth changing or
upgrading the current system. Another consideration is the set of features offered by the
Database software. There may be features that make it compelling or necessary to a company.
The training and experience of the IT Staff should be considered as well as the overall cost of the
program. Finally, issues of reliability and support should be weighed.
Diff: 3 Page Ref: 102-103

8) A small nonprofit provides short term loans for those who need it in their neighborhood area.
They need a database to track donations and grants. They have a small network of about 5
computers. The computers are about four years old and run a windows operating system. None
of the non profit employees have much experience with databases. What are some of the
considerations that would go into choosing a database management system for the non profit?
Answer: One should consider what is compatible with their current systems, especially since
they are unlikely to be able to afford expensive upgrades. Also, ease of use is an issue, given
their lack of training and experience. The windows operating system is not much of a limit since
most open source database management systems will work on Windows as well as other
operating systems but some newer versions may need more power and more current versions of
the Operating System.
Diff: 3 Page Ref: 102-103

16
Copyright © 2014 Pearson Education, Inc.
9) Explain what a null is and what some the implications of nulls are for databases.
Answer: A null is the absence of a value. That means that it cannot be compared to other values.
It also can't really be counted or included in calculations. Despite these facts, a null is often a
better choice than a zero or an empty string, because it accurately reflects the unknown status of
the value rather than substituting a value that may not be accurate and may effect calculations.
Diff: 3 Page Ref: 109-110

10) Explain what a data dictionary is and why it can be a good idea to create one.
Answer: A data dictionary contains a list of all the database objects such as tables, and the
structure and data types for each of the columns in the tables. This can be valuable for future
developers working with the database. It can also be used to help reconstruct the database in case
of disaster.
Diff: 2 Page Ref: 119

17
Copyright © 2014 Pearson Education, Inc.

You might also like