Chapter 24 Accessing Databases with JDBC
24.1 Q1: Java programs communicate with databases using what API?
a. DBMS.
b. JDBC.
c. RDBMS.
d. Database.
24.1 Q2: Which of the following is a key benefit of using JDBC?
a. It is a simple-to-use database management system.
b. Allows developers to change the underlying database without modifying the Java code.
c. It is a multi-platform database management system.
d. It provides a GUI for database management systems.
24.2 Q1: A ________ is a column (or set of columns) which have a unique value that cannot be duplicated
in other rows?
a. primary key.
b. query.
c. SQL statement.
24.2 Q2: To obtain data from a table, you ________ the database?
a. select
b. query
c. get
d. None of the above
24.2 Q3: What does a primary key do?
a. Identifies each row of a table.
b. Selects a number of rows from a database.
c. Stores a bunch of related data.
d. None of the above.
24.3 Q1: What is the name of a key in one table that is required to matche a primary key in another table?
a. Foreign key.
b. Matching key.
c. Joined key.
d. Linking key.
24.3 Q2: Which of the following states the Rule of Entity Integrity?
a. Every row must have a value for the primary key and each value must be unique.
b. Every foreign key must appear as another table’s primary key.