optim development studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/optimdev… ·...

40
© 2009 IBM Corporation August 24, 2009 Optim Development Studio 101 Vijay Bommireddipalli, [email protected] Solutions Architect, Optim Enablement Nik Teshima, [email protected] Product Manager, Rational

Upload: others

Post on 17-Oct-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

© 2009 IBM CorporationAugust 24, 2009

Optim Development Studio 101

Vijay Bommireddipalli, [email protected] Architect, Optim Enablement

Nik Teshima, [email protected] Manager, Rational

Page 2: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation2

Agenda

Optim Development Studio

Java Data Access Development

Rational Application Developer

Closing the loop on data access

5 key features of ODS

Demo time

Page 3: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation3

Resource utilization across application and database infrastructure

DBAs have little to no visibility of application SQL before deployment, no opportunity for review and optimization

Problem isolation takes days due to inability to trace SQL to Java application and source code

Constantly increasing Java application workload taxes existing systems – need to fit more work into existing systems

SQL injection represents an increasing risk to data security

Java Data Access –Two Views of the World

DeveloperDBA

No insight into data access performance

Databases are a different skills domain

Not a productive development environment

No single environment that spans Java application and database development

Problem isolation and resolution

mashuphttp

JSON

JSPXML

JDBC

SQL

Spring

StoredProcedures

QoS goalsRunstats

Response Time! REORG

Partition strategy

Page 4: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation4

Enhance developer productivity – Develop, test, and run queries, procedures, and functions. – Generate Java data access layers– Identify application hot spots– Analyze impact of changes– Analyze use of sensitive data– Enhance problem isolation

Provide expert-equivalent performance– Use JDBC and SQL data access best practices– Use DB2 static SQL for performance and manageability – Replace problem SQL without opening the application

Optim Development Studio

“IBM Optim Development Studio enables us to bridge the gap between object-oriented design and relational database technology. As a result, we can speed the development of high quality applications and improve developer productivity by between 25 and 50 percent”

Integrated database development environment that speeds application design, development, and deployment

while increasing data access performance and manageability

Page 5: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation5

Layered Application Stack Challenges

Application Server Database Server

Data A

ccess Logic

Persistence Layer

DB

Java Driver

EJB Query Language

Connection

Pool

BusinessLogic

1

2

3

Network

A

A

A

Page 6: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation6

Layered Application Stack Challenges

Simplify development, but …– Challenge problem resolution – Impact performance– Obscure impact analysis– Impede capacity planning

Application Server Database Server

Data A

ccess Logic

Persistence Layer

DB

Java Driver

EJB Query Language

Connection

Pool

BusinessLogic

1

2

3

Network

A

A

A

Page 7: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation7

Layered Application Stack Challenges

Simplify development, but …– Challenge problem resolution – Impact performance– Obscure impact analysis– Impede capacity planning

Layers obscure linkages– Where is the problem?– Which application is running?– Which application does this SQL

belong to?

Application Server Database Server

Data A

ccess Logic

Persistence Layer

DB

Java Driver

EJB Query Language

Connection

Pool

BusinessLogic

1

2

3

Network

A

A

A

Page 8: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation8

Layered Application Stack Challenges

Simplify development, but …– Challenge problem resolution – Impact performance– Obscure impact analysis– Impede capacity planning

Layers obscure linkages– Where is the problem?– Which application is running?– Which application does this SQL

belong to?

Application Server Database Server

Data A

ccess Logic

Persistence Layer

DB

Java Driver

EJB Query Language

Connection

Pool

BusinessLogic

1

2

3

Network

A

A

A

Application

Developer

System

s A

dministrator

Netw

ork A

dministrator

Database

Adm

inistrator

Page 9: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation9

RAD Accelerates SOA, Java EE, Web 2.0, Portal Development for IBM Middleware

RAD

WAS

Analyze

Deploy

Test

Debug

Visualize

Validate

Refactor

Annotate

Refine

Quick Fix

WAS Integration

Hot deploy incremental changes to WAS

Web 2.0Extend assets to the glass via rich, dynamic JSF and AJAX applications

SOAAssemble Web services

and SCA components into heterogeneous

business applications

PortalVisually design portal sites and portlets for

WebSphere Portal Server

Java EE 5Develop and test Java EE 5 applications with annotation based programming

Team Collaboration

Rational Team Concert: Collaborate, Automate,

Report

Evans Data 2009 IDE User Choice Award

Page 10: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation10

RAD features and function bring value to your organization by:Increased developer productivity– Iterative creation, validation, revision and deletion of artifacts.– Simplified business logic programming models via Java annotations.– Support for WAS V7 – Java EE 5, EJB 3, JPA, JSF 1.2, JAX-WS 2.1, JAXB

2.0, JSP 2.1, Servlet 2.5…– Simplified development of RIA clients to extend and expose services and

feedsImproved application quality – Line level code coverage, advanced code review and debug capabilities.Integration with other IBM products– WebSphere Application Server, – WebSphere Portal– Optim Development Studio– WebSphere adapter Support – SAP, PeopleSoft, Siebel…– Rational Software Delivery Platform

• Rational Team Concert, Rational Appscan…

RAD Value Statements

Page 11: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation11

Java /Application technologies Persistence technologiesDatabase only

mashup

http

JSONServlets, JSP,JMS, ….

SQL/XQuery

Create/alter database objects

Explain

Stored Procedures

StaticSQLJDBC

JPARUNSTATS

Swing,AWT,SWT

pureQuery tooling

SQL Outline

EJB

Java EE

Ajax / dojoStruts

Web Services

SCA

Portal / Portlet

JSF

XML

J2C

Optim Development StudioExtends and enriches RAD persistence layer and database access development for use with Optim

pureQuery performance optimization and development and debug productivity aids

Rational Application DeveloperComprehensive Web and Java EE

development environment.

RAD and ODS – addressing end to end development

Data distribution

Page 12: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation12

Gaining More Insight with SQL Outline View

Page 13: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation13

Gaining More Insight with SQL Outline View

Visualize application SQL

Page 14: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation14

Gaining More Insight with SQL Outline View

Visualize execution metrics

Page 15: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation15

Gaining More Insight with SQL Outline View

Execute, tune, share, trace, explore SQL

Page 16: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation16

Gaining More Insight with SQL Outline ViewCorrelate with issuing code

Page 17: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation17

Gaining More Insight with SQL Outline View

Correlate with data source

attributes

Page 18: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation18

Gaining More Insight with SQL Outline View

Replace SQL without changing the application

Page 19: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation19

Gaining More Insight with SQL Outline View

Compare performance data of various versions

of your application

Page 20: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation20

JPA Persistence Engine

DB2, Oracle and Informix now…more coming

pureQuery

JPA API

Database Access and pureQueryMany On-ramps for New and Existing Applications

Java Persistence API (JPA)

Webservices

Page 21: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation21

Closing the loop on data access development

Capture – Capture performance and

application metadata

Optimize– Review and share SQL

• Visualize hotspots• Analyze impacts from schema

changes• Trace SQL to originating source

– Optimize and replace SQL – Create approved SQL list

Deploy – Configure execution properties– Optionally bind for static execution

Capture

Review Restrict

Configure Bind

Execute

Monitor

Optimize

Java Persistence Architecture

Page 22: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation22

DB2 Data Servers

pureQuery client optimization enables ‘approved-list’ and static execution for JDBC applications (custom-developed, framework-based, or packaged)

Optimize Existing JDBC Applications

Captured SQL-

relatedmetadata

Capture Configure Bind ExecuteImprove performance – without changing a line of code

“The ability to use static SQL with pureQuery is huge. Recently, I worked with a client who could reduce CPU usage by 7 percent thanks to this one feature.”

- David Beulke

Existing JDBC Application

JDBC Driver w/ pureQuery

Dynamic SQL execution Static SQL execution

Oracle, IDS

Page 23: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation23

Hides JDBC complexity with higher-level Java API Auto-generates the implementationReturns standard Java datatypes: arrays, iterators etc.Accelerates development with slick tooling !

pureQuery API Helps Developers and DBAs

Developer DBA

getCustomers() maps to an SQL statementDBA can now inspect SQLDBA can convert to static SQL packageMetadata is captured during development phase which lessens DBA workload

getCustomers() a user defined API

Incorporates database best practices to improve performanceImproves resource utilization across application and database infrastructureReduces network trips to the database

– Query over java collections– Heterogeneous batching

Page 24: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation24

IBM Optim Development Studio

5 key ways Developer facilitates Database Application Development

1. pureQuery for Java Data Access–Develop / Deploy / Debug Dynamic & Static

2. Manage Database Objects–Create/Alter/Drop

3. Queries–Develop / Run SQL, SQL/XML, XQuery

4. Stored Procedures–Develop / Deploy / Debug SQL/Java

5. Data Web Services–Develop / Deploy

Page 25: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation25

Java Data Access in 5 Simple Steps

Now let’s take a look at the tooling available in OptimDevelopment Studio for pureQuery development. I mentioned thereis a lot of wizard driven code generation that can be done to jumpstart your application development. So in OptimDevelopment Studio you can simply right click on a table, a view, a stored procedure or even an SQL statement and say generate pureQuery code. When you select that, it will pull up a menu where you can specify the bean and select the style of API you would like to use. If you recall I mentioned that you could choose either the in-line style or the method style. In the method style you can separate out all the SQL into an interface, so here I pick the method style. Then you can also choose to generate a test program so that you can test out the generated code. This could be a simpletest or it could also be a JUnittest if you want to tie it to a set of JUnittests. Next, the pureQuery code will go in and introspect the table to figure out the columns that are part of this table and suggest specific Java fields that you would use. These Java fields are fully customizable, you can you can change them and pureQuery will map it to that specific column name. This is what it will use to generate the getters and setters that your Java developers will then use and finally you will specify the SQL statements that you'd like to be performed against the specific databaseobject. In this particular case, we picked a table. The key thing to mention here is that this is user specified SQL, so if youhave a set of SQL statements that you'd like to do against thistable the interface file will contain all of this SQL. So if you are sitting with the DBA and you'd like to inspect the SQL that is being run, you can do that by just launched this interface file and pureQuery code then goes ahead and generates implementation for this. So the developer is not really tasked with writing the JDBC code associated with this interface, the implementation for that interface is generated for the developer by pureQuery. Of course you can still go back and check all the code that has been generated so that you can inspect it for consistency, you can verify it, you can test the classes that have been generated for you and simply by using the general Java functions. It would be noteworthy to point other that in our v2.1 release we have taken this a step further, you are now able to select multipletables or multiple objects and right click and say generate pureQuery code. You can generate a whole bunch of code for all yourdatabase objects in one shot. You can also go back and change SQL associated with each of these objects within these interfacesand every time you hit save, pureQuery generates the implementation for you, so you are essentially abstracted away from havingto write the JDBC code associated with the interface, so a lot of productivity boost baked into the code generation capabilities.

Page 26: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation26

1. Select table

Java Data Access in 5 Simple Steps

Now let’s take a look at the tooling available in OptimDevelopment Studio for pureQuery development. I mentioned thereis a lot of wizard driven code generation that can be done to jumpstart your application development. So in OptimDevelopment Studio you can simply right click on a table, a view, a stored procedure or even an SQL statement and say generate pureQuery code. When you select that, it will pull up a menu where you can specify the bean and select the style of API you would like to use. If you recall I mentioned that you could choose either the in-line style or the method style. In the method style you can separate out all the SQL into an interface, so here I pick the method style. Then you can also choose to generate a test program so that you can test out the generated code. This could be a simpletest or it could also be a JUnittest if you want to tie it to a set of JUnittests. Next, the pureQuery code will go in and introspect the table to figure out the columns that are part of this table and suggest specific Java fields that you would use. These Java fields are fully customizable, you can you can change them and pureQuery will map it to that specific column name. This is what it will use to generate the getters and setters that your Java developers will then use and finally you will specify the SQL statements that you'd like to be performed against the specific databaseobject. In this particular case, we picked a table. The key thing to mention here is that this is user specified SQL, so if youhave a set of SQL statements that you'd like to do against thistable the interface file will contain all of this SQL. So if you are sitting with the DBA and you'd like to inspect the SQL that is being run, you can do that by just launched this interface file and pureQuery code then goes ahead and generates implementation for this. So the developer is not really tasked with writing the JDBC code associated with this interface, the implementation for that interface is generated for the developer by pureQuery. Of course you can still go back and check all the code that has been generated so that you can inspect it for consistency, you can verify it, you can test the classes that have been generated for you and simply by using the general Java functions. It would be noteworthy to point other that in our v2.1 release we have taken this a step further, you are now able to select multipletables or multiple objects and right click and say generate pureQuery code. You can generate a whole bunch of code for all yourdatabase objects in one shot. You can also go back and change SQL associated with each of these objects within these interfacesand every time you hit save, pureQuery generates the implementation for you, so you are essentially abstracted away from havingto write the JDBC code associated with the interface, so a lot of productivity boost baked into the code generation capabilities.

Page 27: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation27

1. Select table

Now let’s take a look at the tooling available in OptimDevelopment Studio for pureQuery development. I mentioned thereis a lot of wizard driven code generation that can be done to jumpstart your application development. So in OptimDevelopment Studio you can simply right click on a table, a view, a stored procedure or even an SQL statement and say generate pureQuery code. When you select that, it will pull up a menu where you can specify the bean and select the style of API you would like to use. If you recall I mentioned that you could choose either the in-line style or the method style. In the method style you can separate out all the SQL into an interface, so here I pick the method style. Then you can also choose to generate a test program so that you can test out the generated code. This could be a simpletest or it could also be a JUnittest if you want to tie it to a set of JUnittests. Next, the pureQuery code will go in and introspect the table to figure out the columns that are part of this table and suggest specific Java fields that you would use. These Java fields are fully customizable, you can you can change them and pureQuery will map it to that specific column name. This is what it will use to generate the getters and setters that your Java developers will then use and finally you will specify the SQL statements that you'd like to be performed against the specific databaseobject. In this particular case, we picked a table. The key thing to mention here is that this is user specified SQL, so if youhave a set of SQL statements that you'd like to do against thistable the interface file will contain all of this SQL. So if you are sitting with the DBA and you'd like to inspect the SQL that is being run, you can do that by just launched this interface file and pureQuery code then goes ahead and generates implementation for this. So the developer is not really tasked with writing the JDBC code associated with this interface, the implementation for that interface is generated for the developer by pureQuery. Of course you can still go back and check all the code that has been generated so that you can inspect it for consistency, you can verify it, you can test the classes that have been generated for you and simply by using the general Java functions. It would be noteworthy to point other that in our v2.1 release we have taken this a step further, you are now able to select multipletables or multiple objects and right click and say generate pureQuery code. You can generate a whole bunch of code for all yourdatabase objects in one shot. You can also go back and change SQL associated with each of these objects within these interfacesand every time you hit save, pureQuery generates the implementation for you, so you are essentially abstracted away from havingto write the JDBC code associated with the interface, so a lot of productivity boost baked into the code generation capabilities.

Java Data Access in 5 Simple Steps

2. Name bean & select styles

Page 28: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation28

1. Select table

Now let’s take a look at the tooling available in OptimDevelopment Studio for pureQuery development. I mentioned thereis a lot of wizard driven code generation that can be done to jumpstart your application development. So in OptimDevelopment Studio you can simply right click on a table, a view, a stored procedure or even an SQL statement and say generate pureQuery code. When you select that, it will pull up a menu where you can specify the bean and select the style of API you would like to use. If you recall I mentioned that you could choose either the in-line style or the method style. In the method style you can separate out all the SQL into an interface, so here I pick the method style. Then you can also choose to generate a test program so that you can test out the generated code. This could be a simpletest or it could also be a JUnittest if you want to tie it to a set of JUnittests. Next, the pureQuery code will go in and introspect the table to figure out the columns that are part of this table and suggest specific Java fields that you would use. These Java fields are fully customizable, you can you can change them and pureQuery will map it to that specific column name. This is what it will use to generate the getters and setters that your Java developers will then use and finally you will specify the SQL statements that you'd like to be performed against the specific databaseobject. In this particular case, we picked a table. The key thing to mention here is that this is user specified SQL, so if youhave a set of SQL statements that you'd like to do against thistable the interface file will contain all of this SQL. So if you are sitting with the DBA and you'd like to inspect the SQL that is being run, you can do that by just launched this interface file and pureQuery code then goes ahead and generates implementation for this. So the developer is not really tasked with writing the JDBC code associated with this interface, the implementation for that interface is generated for the developer by pureQuery. Of course you can still go back and check all the code that has been generated so that you can inspect it for consistency, you can verify it, you can test the classes that have been generated for you and simply by using the general Java functions. It would be noteworthy to point other that in our v2.1 release we have taken this a step further, you are now able to select multipletables or multiple objects and right click and say generate pureQuery code. You can generate a whole bunch of code for all yourdatabase objects in one shot. You can also go back and change SQL associated with each of these objects within these interfacesand every time you hit save, pureQuery generates the implementation for you, so you are essentially abstracted away from havingto write the JDBC code associated with the interface, so a lot of productivity boost baked into the code generation capabilities.

Java Data Access in 5 Simple Steps

2. Name bean & select styles

3. Generate test code

Page 29: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation29

1. Select table

Now let’s take a look at the tooling available in OptimDevelopment Studio for pureQuery development. I mentioned thereis a lot of wizard driven code generation that can be done to jumpstart your application development. So in OptimDevelopment Studio you can simply right click on a table, a view, a stored procedure or even an SQL statement and say generate pureQuery code. When you select that, it will pull up a menu where you can specify the bean and select the style of API you would like to use. If you recall I mentioned that you could choose either the in-line style or the method style. In the method style you can separate out all the SQL into an interface, so here I pick the method style. Then you can also choose to generate a test program so that you can test out the generated code. This could be a simpletest or it could also be a JUnittest if you want to tie it to a set of JUnittests. Next, the pureQuery code will go in and introspect the table to figure out the columns that are part of this table and suggest specific Java fields that you would use. These Java fields are fully customizable, you can you can change them and pureQuery will map it to that specific column name. This is what it will use to generate the getters and setters that your Java developers will then use and finally you will specify the SQL statements that you'd like to be performed against the specific databaseobject. In this particular case, we picked a table. The key thing to mention here is that this is user specified SQL, so if youhave a set of SQL statements that you'd like to do against thistable the interface file will contain all of this SQL. So if you are sitting with the DBA and you'd like to inspect the SQL that is being run, you can do that by just launched this interface file and pureQuery code then goes ahead and generates implementation for this. So the developer is not really tasked with writing the JDBC code associated with this interface, the implementation for that interface is generated for the developer by pureQuery. Of course you can still go back and check all the code that has been generated so that you can inspect it for consistency, you can verify it, you can test the classes that have been generated for you and simply by using the general Java functions. It would be noteworthy to point other that in our v2.1 release we have taken this a step further, you are now able to select multipletables or multiple objects and right click and say generate pureQuery code. You can generate a whole bunch of code for all yourdatabase objects in one shot. You can also go back and change SQL associated with each of these objects within these interfacesand every time you hit save, pureQuery generates the implementation for you, so you are essentially abstracted away from havingto write the JDBC code associated with the interface, so a lot of productivity boost baked into the code generation capabilities.

Java Data Access in 5 Simple Steps

2. Name bean & select styles

3. Generate test code

4. Map table to bean

Page 30: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation30

1. Select table

Now let’s take a look at the tooling available in OptimDevelopment Studio for pureQuery development. I mentioned thereis a lot of wizard driven code generation that can be done to jumpstart your application development. So in OptimDevelopment Studio you can simply right click on a table, a view, a stored procedure or even an SQL statement and say generate pureQuery code. When you select that, it will pull up a menu where you can specify the bean and select the style of API you would like to use. If you recall I mentioned that you could choose either the in-line style or the method style. In the method style you can separate out all the SQL into an interface, so here I pick the method style. Then you can also choose to generate a test program so that you can test out the generated code. This could be a simpletest or it could also be a JUnittest if you want to tie it to a set of JUnittests. Next, the pureQuery code will go in and introspect the table to figure out the columns that are part of this table and suggest specific Java fields that you would use. These Java fields are fully customizable, you can you can change them and pureQuery will map it to that specific column name. This is what it will use to generate the getters and setters that your Java developers will then use and finally you will specify the SQL statements that you'd like to be performed against the specific databaseobject. In this particular case, we picked a table. The key thing to mention here is that this is user specified SQL, so if youhave a set of SQL statements that you'd like to do against thistable the interface file will contain all of this SQL. So if you are sitting with the DBA and you'd like to inspect the SQL that is being run, you can do that by just launched this interface file and pureQuery code then goes ahead and generates implementation for this. So the developer is not really tasked with writing the JDBC code associated with this interface, the implementation for that interface is generated for the developer by pureQuery. Of course you can still go back and check all the code that has been generated so that you can inspect it for consistency, you can verify it, you can test the classes that have been generated for you and simply by using the general Java functions. It would be noteworthy to point other that in our v2.1 release we have taken this a step further, you are now able to select multipletables or multiple objects and right click and say generate pureQuery code. You can generate a whole bunch of code for all yourdatabase objects in one shot. You can also go back and change SQL associated with each of these objects within these interfacesand every time you hit save, pureQuery generates the implementation for you, so you are essentially abstracted away from havingto write the JDBC code associated with the interface, so a lot of productivity boost baked into the code generation capabilities.

Java Data Access in 5 Simple Steps

2. Name bean & select styles

3. Generate test code

4. Map table to bean

5. Select template SQL CRUD

Page 31: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation31

Managing database objects-Enabled for the latest features of IBM data servers

Create, Alter, Drop, Browse, FilterCreate, Alter, Drop, Browse, Filter

Database ExplorerDatabase Explorer

Buffer PoolsGroupsPartition GroupsRemote ServersRolesSchemasAliasesDependenciesFederated SPsMQTsNicknamesPackagesSequencesStored ProceduresTablesUDFsUDTsViewsXML SchemasTable SpacesUsers

Object Editor

Data Viewer

Page 32: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation32

New Oracle Support: Optim Development Studio and pureQueryV2.2Unified solution across DB2, Informix, and Oracle

Connect to and explore Oracle database objects Move/copy database objects and data between Oracle and DB2Edit, run, debug and deploy PL/SQL procedures on Oracle and DB2Build Java applications for Oracle with pureQuery data access methods Use productivity features for tracing SQL to source, hot spot analysis, and impact analysis for Oracle applicationsRun commands via new CLPPlus

New!Load Oracle catalog

Edit database objects

View SQL and execution results

Take context-sensitive actions

Page 33: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation33

Unleash SQL in your Java IDE – Make your developers more productive

SQL content assist

SQL validation

Page 34: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation34

Extending Impact Analysis with Optim Development Studio

Identify table references in Java packages– Start from Data Source

Explorer or from DDL– Visualize in SQL Outline– Find in source code or in

pureQuery XML file– Edit in source or in XML file

without changing source

Start with ALTER DDL to visualize

impact

Page 35: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation35

Stored Procedures DevelopmentDevelop, debug and deploy– SQL stored procedures– Java Stored Procedures in JDBC– Java Stored Procedures in SQLJ– Oracle PLSQL Stored Procedures

Wizard-driven– Step by step creation– Parameter definition– Enable debugging– Integrated deploy

Generate Java Stored Procedures from Java application code

Page 36: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation36

Database access via Web services

SQLXQuery

Stored Procedures

Data

Data access

Database

OperationData-oriented Web Services

Operation

Database Operations

Operation

Page 37: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation37

Minimize Production Slowdowns, Tune in Development

Visualize query hot spots– Most frequently executed– Longest running

Get expert advice – Query structure– Statistics advice– Index recommendations

including what-if analysis

Validate improvement – Replace SQL– Run application– Compare performance results

Advisor overview

Recommendations

Find hot spots

Get expert advice

Compare results

Page 38: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation38

Rational and Optim - Complementary Application and Data Development Capabilities

Software Architect

RequirementsAnalyst

Developer

WebSphereBusiness Modeler

RationalApplication Developer

Optim Development Studio

Data Architect

Data Access Developer

InfoSphere Data Architect

Optim Query Tuner

RationalRequisitePro

RationalSoftware Architect

Optim Test Data Management

Rational Quality Manager

Database Administrator

Business Analyst

Tester

InfoSphere Business Glossary

Optim Database Administrator

Page 39: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation39

ResourcesdeveloperWorks, Optim Development Studio page– http://www.ibm.com/developerworks/data/products/devstudio/– tutorials, white papers

IBM Integrated Data Management community space (downloads, articles, tutorials, discussion forums, videos and more!)– http://www.ibm.com/developerworks/spaces/optim

Optim Development Studio and pureQuery discussion forum– http://www.ibm.com/developerworks/forums/forum.jspa?forumID=1797

Integrated Data Management experts team blog– http://www.ibm.com/developerworks/mydeveloperworks/blogs/idm/

Page 40: Optim Development Studio 101public.dhe.ibm.com/software/dw/data/events/idmbriefings/OptimDev… · – Use JDBC and SQL data access best practices – Use DB2 static SQL for performance

Information Management

© 2009 IBM Corporation40

Two upcoming events you may be interested in!DB2 Chat with the Lab: Simplifying Administration and Development with IBM Data Studio – August 27, 2009We'll cover the most frequently asked "how to" questions to get you up and running with Data Studio including installation, database object and data management, utilities management, configuration and tuning, as well as tooling to take advantage of new features in DB2 9.7 such as Workload Management and Oracle migrations.– URL to register for this event: http://tinyurl.com/studiochat

IDM Virtual Tech Briefing: SQL Stored procedure Development and Debug for DB2 for z/OS: Getting Started – September 24, 2009Stored procedure development is a common task and one of the areas we get the most questions about. In this first session, get familiar with Optim Development Studio capabilities and then create, deploy, and run a stored procedure.– Links for this and other upcoming briefings:

ibm.com/developerworks/data/events/idmbriefings.html