Learn how to use
the workbench to create a Java application
that is enabled with pureQuery client optimization. Then learn how
to export the application to a directory on your computer and configure
your computer to run the application with pureQuery client optimization
enabled.
You enable an application with pureQuery client optimization
to control how SQL statements are run by the application without modifying
application source code. Rather than requiring changes to application
code, pureQuery client optimization changes how a JDBC driver interacts
with the application.
In a workbench Java project that is enabled with pureQuery
support, you can enable the application with pureQuery client optimization.
You can perform tasks in the workbench such as:
- Capture and manage SQL statements that are issued by the application.
- Manage relationships between SQL statements, database objects,
and Java source code.
- Run SQL statements.
- Test pureQuery client optimization configurations that control
how SQL statements are run.
Learning objectives
After
you complete this tutorial, you will be able to do the following tasks:
- Enable a Java project with
pureQuery support.
- Configure a simple JDBC-based Java application
to complete the following tasks:
- Capture SQL statements that are issued by the application in a
pureQueryXML file.
- Configure pureQuery Runtime to run the application SQL statements
statically.
- Identify packages that are associated with captured SQL statements.
- Run SQL statements that are issued by the application statically
without changing the application.
- Run only SQL statements that are in the pureQueryXML file.
- Run the Java application
that is enabled with pureQuery client optimization on your computer
outside of the workbench.
Time required
This tutorial takes approximately
90 minutes to finish. If you explore other concepts related to this
tutorial, it could take longer to complete.
Skill level
Intermediate
Audience
Java application developers
System requirements
To complete
this tutorial, you must have the following software:
- IBM® Data Studio Version
3.1
- DB2® Enterprise Server Edition
Version 9.5 Linux, UNIX, and Windows Fix Pack 3
- The DB2 SAMPLE database.
Information about creating the database is located at Creating the sample database (Link to the DB2 information center)
- pureQuery Runtime Version 2.2.1
- IBM Data Server Driver for
JDBC and SQLJ Version 3.57
Prerequisites
To complete this tutorial,
you should be familiar with the following concepts:
- Java projects in Eclipse
- Basic Java programming
- Basic knowledge of SQL
Expected results
You will be able to
do the following tasks:
- Enable a Java project with
pureQuery support.
- Determine the location of database packages on a database that
are created when you perform a bind operation on a pureQueryXML file.
- Extract SQL statements from Java source
code.
- Determine the location of SQL statements in Java source code.
- Create pureQuery files such as pureQueryXML files, bind properties
files, configuration properties files, pureQuery Runtime properties
files.
- Perform pureQuery configuration and bind operations on pureQueryXML.