Databases Exam Prep Chapter 16 - Java Control Structures 7e Test Bank by Tony Gaddis. DOCX document preview.

Databases Exam Prep Chapter 16

Starting Out with Java: From Control Structures through Objects 7e (Gaddis)

Chapter 16 Databases

TRUE/FALSE

1. Although SQL is a language, you don't use it to write applications.

2. The columns in a table are assigned SQL data types.

3. In SQL the equal operator is ==, the same as Java.

4. SQL does not provide functions for performing calculations.

5. Systems designers commonly use UML diagrams to show the relationships between database tables.

6. No two rows in a table can have the same value in the primary key column.

7. In SQL the REFERENCES qualifier ensures referential integrity between tables.

8. SQL statements that are stored in the DBMS are called resident queries.

9. In a transaction, all updates to the database must be successfully executed.

10. The term commit refers to undoing changes in a database.

MULTIPLE CHOICE

1. Which of the following do most developers prefer to use when developing applications that work with an intensive amount of data?

a.

text files

c.

a database management system

b.

binary files

d.

Java DB

2. The standard lanuage for working with database management systems is __________.

a.

SQL

b.

BASIC

c.

ADA

d.

COBOL

3. The DBMS works directly with the data and sends the results of operations __________.

a.

back to the application

c.

to the unified data component

b.

along the encrypted data path

d.

back to the Web server

4. SQL stands for __________.

a.

structured query language

c.

semiconductor qualified language

b.

standard equivalent language

d.

simple equation library

5. The data that is stored in a row of a database is divided into __________.

a.

sections

b.

tables

c.

bytes

d.

columns

6. What will happen if you try to store duplicate data in a primary key column?

a.

The column will be duplicated.

b.

An error will occur.

c.

The duplicate data will have concurrency issues.

d.

The primary key column will not display the duplicate data.

7. A result set is an object that is somewhat similar to a collection and it __________.

a.

contains the result of a SQL statement

b.

allows the program to execute a SQL statement

c.

predicts the outcome of a SQL statement

d.

provides the rules for how a SQL statement should be executed

8. The __________ type of SQL statement is used to retrieve the rows from a table.

a.

GET

b.

SELECT

c.

READ

d.

RETRIEVE

9. Of the following column names, which one is most likely a primary key column?

a.

Price

c.

ItemNumber

b.

Description

d.

Quantity

10. Which of the following shows how a single quote (') is represented as part of a string in SQL?

a.

_'

b.

"'"

c.

/'

d.

''

11. Which of the following is the not-equal-to operator in SQL?

a.

!=

b.

NOT

c.

||

d.

<>

12. Which of the following can be used as a wildcard to represent a single character in SQL?

a.

percent sign ( % )

c.

underscore ( _ )

b.

dollar sign ( $ )

d.

asterisk ( * )

13. The __________ SQL operator can be used to perform a search for a substring.

a.

STR

b.

LIKE

c.

WHERE

d.

SUB

14. The __________ SQL operator can be used to disqualify search criteria in a WHERE clause.

a.

AND

b.

NOT

c.

EXCLUDE

d.

NOR

15. To sort the results of a SQL query, you can use the __________ clause.

a.

SORT BY

b.

ALIGN ROW

c.

ORDER BY

d.

ASCEND

16. Which of the following is the Statement interface method that should be used to execute a SELECT statement?

a.

executeSQL

c.

executeUpdate

b.

executeStatement

d.

executeQuery

17. Which of the following is the Statement interface method that should be used to execute an INSERT statement.

a.

executeSQL

c.

executeUpdate

b.

executeStatement

d.

executeQuery

18. The __________ statement is used in SQL to insert a new row into a table,

a.

UPDATE

b.

ADD

c.

NEW

d.

INSERT

19. In SQL, the __________ statement is used to change the contents of an existing row in a table.

a.

SET ROW

b.

CHANGE

c.

UPDATE

d.

REFRESH

20. In SQL, the __________ statement is used to delete one or more rows from a table.

a.

DELETE

b.

DROP ROW

c.

REMOVE

d.

PURGE

21. In SQL, the __________ statement can be used to create a database table.

a.

NEW TABLE

c.

BUILD TABLE

b.

MAKE TABLE

d.

CREATE TABLE

22. In SQL, the __________ statement is used to delete a table from a database.

a.

REMOVE TABLE

c.

DROP TABLE

b.

DEL TABLE

d.

ERASE TABLE

23. What does JDBC stand for?

a.

Java data binary collection

c.

Java database collection

b.

Java database connectivity

d.

Java data basic computation

24. What string lists the protocol that should be used to access a database, the name of the database, and potentially other items?

a.

JDBC driver

c.

JDBC locator

b.

Database URL

d.

Database specifier

25. What is the default concurrency level of a ResultSet object?

a.

public

b.

updatable

c.

private

d.

read-only

26. __________ refers to data that describes other data.

a.

pseudodata

b.

microdata

c.

abstract data

d.

metadata

27. A column in one table that references a primary key in another table is known as a __________.

a.

secondary key

c.

referential key

b.

foreign key

d.

meta key

28. Which term refers to undoing changes to a database?

a.

uncommit

b.

reverse

c.

rollback

d.

undo

29. In an entity relationship diagram, the primary key is denoted with __________.

a.

(PK)

b.

(1)

c.

(KEY)

d.

(PRIME)

30. A qualified column name takes the form __________.

a.

ColumnName.TableName

c.

RowName.TableName

b.

TableName.ColumnName

d.

DatabaseURL.ColumnName

Document Information

Document Type:
DOCX
Chapter Number:
16
Created Date:
Aug 21, 2025
Chapter Name:
Chapter 16 Databases
Author:
Tony Gaddis

Connected Book

Java Control Structures 7e Test Bank

By Tony Gaddis

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