16.10.2015 Views

Getting Started with WebSphere Application Server

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 4 – Working <strong>with</strong> databases 87<br />

1. Execute the SQL statements below on the created data source using the Community<br />

Edition Administrative Console.<br />

create table employees(empID INTEGER, empName VARCHAR(20), empAge<br />

INTEGER);<br />

insert into employees(empID, empName, empAge) values (1, 'Tom', 26);<br />

insert into employees(empID, empName, empAge) values (1, 'John', 28);<br />

insert into employees(empID, empName, empAge) values (1, 'Jerry', 25);<br />

2. Use the SQL statement below to retrieve data using the Administrative Console.<br />

select empID, empName from employees where empAge > 25<br />

4.7 Review questions<br />

1. What is the name of the java API that is used to access relational databases?<br />

2. What are the steps to use this Java API to access the database?<br />

3. What type of JDBC driver for DB2 is used in this book?<br />

4. What is the JNDI prefix for a JDBC data source?<br />

5. List at least three database vendors that Community Edition supports.<br />

6. What tools could be used to create DB2 databases?<br />

A. DB2 Replication Center<br />

B. DB2 Health Center<br />

C. IBM Data Studio<br />

D. DB2 Command Line Processor<br />

E. All of the above<br />

7. Which of the following files supplies only a type 2 JDBC driver for DB2?<br />

A. db2jcc.jar<br />

B. db2java.zip<br />

C. db2jcc4.jar<br />

D. sqlj.jar<br />

E. None of the above<br />

8. Which of the following java versions does the type 4 JDBC 4.0 compliant driver of<br />

DB2 work <strong>with</strong>?<br />

A. 1.3<br />

B. 1.4.2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!