Chapter.25 Verified Test Bank Databases - Java Foundations 4th Edition | Test Bank with Answer Key by John Lewis by John Lewis, Peter DePasquale, Joe Chase. DOCX document preview.

Chapter.25 Verified Test Bank Databases

Chapter 25: Databases

Multiple Choice Questions:

1) The four primary operations on data can be expressed by which acronym?

a) JUNK

b) CRUD

c) LIFO

d) FIFO

e) LIST

2) In a relational database, the information and the relations between information are organized into

a) tables

b) rows

c) classes

d) objects

e) inheritance hierarchies

3) A driver is used to

a) operate a program

b) connect to a database

c) move data around

d) manage the objects in a program

e) None of these is correct

4) A relational database conserves space by

a) using smaller numbers

b) reducing the size of strings

c) using only lowercase letters

d) avoiding data replication

e) None of these is correct

5) If a table has been created in a database, then a subsequent attempt to create the same table in the same database will

a) create a new table with ‘(2)’ at the end of the table name

b) replace the initial table.

c) fail with an exception.

d) remove all of the elements from the initial table

e) None of these is correct

6) If a table is created and it is later determined that additional fields should be added to the table, it is usually preferable to

a) delete the existing table and re-create it with the additional fields

b) create a parallel table that holds just the additional fields

c) re-define an existing field in the table to hold the additional data

d) delete the entire database and start over

e) alter the table to add the additional fields

7) The smallest unsigned integer type that can be used for a field in a MySQL database is a(n)

a) smallInt

b) tinyint

c) littleInt

d) shortInt

e) None of these is correct

8) The MySQL command to remove the field backOrder from the table named inventory is

a) ALTER TABLE inventory DROP COLUMN backOrder

b) DELETE COLUMN backOrder FROM inventory

c) DROP COLUMN backOrder FROM inventory

d) REMOVE FIELD backOrder FROM inventory

e) None of these is correct

9) _________________ is how information is retrieved from a database.

a) Assessing

b) Interceding

c) Querying

d) Altering

e) Removing

10) The SQL statement most often used to retrieve data from a database is

a) RETRIEVE ... FROM

b) FIND ... IN

c) ACCESS DATA GET ...

d) SELECT ... FROM

e) None of these is correct

11) The WHERE clause, if present, contains

a) a condition that evaluates to TRUE or FALSE

b) the number of records to retrieve at a time

c) a list of tables from which to select

d) the separator to use between retrieved records

e) additional fields to retrieve from if the initial list is empty.

12) In order to select all of the fields / columns from a table, use ______ between SELECT and ALL

a) *

b) ANY

c) ALL

d) ALL_COLUMNS

e) ALL_DATA

13) The direction of the sort order of the records retrieved by a SELECT … FROM statement is indicated by

a) UP or DOWN

b) SMALLER TO LARGER or LARGER TO SMALLER

c) ASC or DESC

d) MIN or MAX

e) None of these is correct

14) How do you retrieve data from a table that has been dropped?

a) You prefix the table name with the qualifier DROPPED.

b) Use the SQL statement SELECT ... FROM FORMER

c) You indicate the dropped table name in the WHERE clause

d) Use the (-1) qualifier after the table name to retrieve from the prior version of the table.

e) You do not retrieve data from a table that has been dropped.

15) What will be deleted from a table by a DELETE FROM statement if the WHERE clause is not provided?

a) The first field/column in the table

b) The most recently-added data

c) Everything

d) Nothing – the WHERE clause is required.

e) None of these is correct.

1) Database is an abstract class in the Java Collections library

2) In a relational database, the information that is stored in the database is organized into tables.

3) A The rows in a table in a relational database are referred to as fields.

4) The acronym JDBC refers to ‘Java Data Binary Connector’.

5) The first task in working with a database from a Java program is to create and populate one or more tables.

6) A database driver is a piece of software that allows a program to interact with a database.

7) CREATE TABLE is an SQL statement that is used to create a table in a database

8) A field in a table that is designated as a PRIMARY KEY is a field that will always have the same value.

9) A field can be removed from a table by using the ALTER TABLE … DROP COLUMN statement.

10) Using the ALTER TABLE statement to remove all of the fields / columns by using the DROP COLUMN command accomplishes the same result as the DROP TABLE statement.

1) What is a database management system?

2) What are the four primary operations that can be performed on or with the data in a database?

3) What is the basic organizational unit of a relational database?

4) What is the purpose of the JDBC API?

5) The basic SQL statement to create a table in a database is CREATE TABLE. What additional information is required in the statement besides CREATE TABLE?

6) Suppose you learn, after you have created a table and added records to the table, that additional fields are required in the table. Discuss the differences between using the ALTER TABLE statement to add the new fields vs. dropping the table and using CREATE TABLE to create a new table with the correct fields.

7) Write an SQL statement to create a table named parts that has two columns: a field for a part number, which will be automatically set to the next part number when a new part is added, and a description field, which will hold up to 255 characters of text.

8) Assuming that the table described in question 7) was properly created, write an SQL statement to add a column that will hold the quantity of the part that is in stock. The quantity will never be less than zero.

9) Assuming that the table described in question 7) was properly updated in question 8), write one or more SQL statements to add the following items to the table: Bracket, quantity 25; Flange, quantity 8.

10) Assuming that the table described in question 7) was properly updated in question 8) and populated in question 9), write an SQL statement that will retrieve the part_number field of all records in the table for which the quantity_in_stock field is less than 10.

11) When adding records to a table using an INSERT statement, why don’t we provide a value for the columns in the table that are listed as AUTO INCREMENT?

12) What is a ResultSet?

13) A ResultSet object is organized as a two-dimensional table. What is represented by the rows and the columns of the ResultSet object?

14) What is the difference between deleting everything from a table and dropping a table?

15) Explain the general process of updating data in a database.

Document Information

Document Type:
DOCX
Chapter Number:
25
Created Date:
Aug 21, 2025
Chapter Name:
Chapter 25 Databases
Author:
John Lewis, Peter DePasquale, Joe Chase

Connected Book

Java Foundations 4th Edition | Test Bank with Answer Key by John Lewis

By John Lewis, Peter DePasquale, Joe Chase

Test Bank General
View Product →

$24.99

100% satisfaction guarantee

Buy Full Test Bank

Benefits

Immediately available after payment
Answers are available after payment
ZIP file includes all related files
Files are in Word format (DOCX)
Check the description to see the contents of each ZIP file
We do not share your information with any third party