This tutorial introduces you to some of the features in IBM® Data Studio that you can use
to develop an application that uses pureQuery annotated methods.
A company is using IBM Data
Studio and pureQuery to develop applications that query and update
the company's primary database: GSDB. You are a Java™ developer assigned to this project, and
one of your tasks is to develop Java objects
that these applications can use to query and update the INVENTORY_LEVELS
table. This table records the levels of inventory of the company's
products in different warehouses over different periods of time.
You
need to create a bean that represents the INVENTORY_LEVELS table.
You also need to create an interface that declares pureQuery annotated
methods that run SQL statements against this table.
Finally,
because the GSDB database is a DB2® database,
your project lead wants to take advantage of the speed and security
of static SQL. So, you need to bind the SQL and test running the statements
statically.
Learning objectives
In this tutorial,
you will learn how to:
- Create a Java project and
add support for pureQuery to it
- Avoid coding from scratch by generating code and SQL statements
directly from the INVENTORY_LEVELS table
- Edit the interface that you generate
- Navigate between SQL and Java code
by using the SQL Outline view
- Measure the performance of your SQL statements and learn what
tools you can use to optimize them
- Bind the SQL into database packages and run it statically
Time required
This tutorial should take
approximately 60 minutes to finish. If you explore other concepts
related to this tutorial, it could take longer to complete.
Audience
Java developers
System requirements
For this tutorial,
you need to install: