Due to the print book page limit, we cannot inlcude all good CheckPoint questions in the physical book. The CheckPoint on this Website may contain extra questions not printed in the book. The questions in some sections may have been reordered as a result. Nevertheless, it is easy to find the CheckPoint questions in the book on this Website. Please send suggestions and errata to Dr. Liang at y.daniel.liang@gmail.com. Indicate the book, edition, and question number in your email. Thanks!

Chapter 34 Check Point Questions

Section 34.2
34.2.1
What are superkeys, candidate keys, and primary keys?
34.2.2
What is a foreign key?
34.2.3
Can a relation have more than one primary key or foreign key?
34.2.4
Does a foreign key need to be a primary key in the same relation?
34.2.5
Does a foreign key need to have the same name as its referenced primary key?
34.2.6
Can a foreign key value be null?
Section 34.3
34.3.1
Create the tables Course, Student, and Enrollment using the create table statements in Section 34.3.3, Creating and Dropping Tables. Insert rows into the Course, Student, and Enrollment tables using the data in Figures 34.3-34.5.
34.3.2
List allCSCI courses with at least four credit hours.
34.3.3
List all students whose last names contain the letter e two times.
34.3.4
List all students whose birthdays are null.
34.3.5
List all students who take Math courses.
34.3.6
List the number of courses in each subject.
34.3.7
Assume that each credit hour is 50 minutes of lectures. Get the total minutes for the courses that each student takes.
Section 34.4
34.4.1
What are the advantages of developing database applications using Java?
34.4.2
Describe the following JDBC interfaces: Driver, Connection, Statement, and ResultSet.
34.4.3
How do you load a JDBC driver? What are the driver classes for MySQL, Oracle, and Java DB?
34.4.4
How do you create a database connection? What are the URLs for MySQL, Oracle, and Java DB?
34.4.5
How do you create a Statement and execute an SQL statement?
34.4.6
How do you retrieve values in a ResultSet?
34.4.7
Does JDBC automatically commit a transaction? How do you set autocommit to false?
Section 34.5
34.5.1
Describe prepared statements. How do you create instances of PreparedStatement? How do you execute a PreparedStatement? How do you set parameter values in a PreparedStatement?
34.5.2
What are the benefits of using prepared statements?
Section 34.6
34.6.1
Describe callable statements. How do you create instances of CallableStatement? How do you execute a CallableStatement? How do you register OUT parameters in a CallableStatement?
Section 34.7
34.7.1
What is DatabaseMetaData for? Describe the methods in DatabaseMetaData. How do you get an instance of DatabaseMetaData?
34.7.2
What is ResultSetMetaData for? Describe the methods in ResultSetMetaData. How do you get an instance of ResultSetMetaData?
34.7.3
How do you find the number of columns in a result set? How do you find the column names in a result set?