DB-1: Understanding and Leveraging the Latest ODBC and JDBC Technology What’s new in OpenEdge® 10.1A? Rob Steward Director of Software Development.

Slides:



Advertisements
Similar presentations
Connecting to Databases. connecting to DB DB server typically a standalone application Server runs on localhost for smaller sites –i.e. Same machine as.
Advertisements

Connecting to Databases. relational databases tables and relations accessed using SQL database -specific functionality –transaction processing commit.
Lecture plan Information retrieval (from week 11)
SQL Based Data Access Bodo Bachmann.
Copyright  Oracle Corporation, All rights reserved. 2 Java and Databases: An Overview.
Distributed Transactions in Java EE Nikolai Tankov SAP Labs Bulgaria January 19th, 2008 Sofia, Bulgaria.
Java and Databases CS-328 Dick Steflik. Database Drivers Think of a database as just another device connected to your computer like other devices it has.
Distributed Application Development B. Ramamurthy.
SQL (Structured Query Language) X/OPEN Call Level Interface For SQL ODBC (Open DataBase Connectivity) API JDBC (Java DataBase Connectivity) API SQL (Structured.
ODBC and JDBC Aggie Hoversten CSCI Fall 1999.
1 Lecture 29 More on JDBC Overview  Objectives of this lecture  JDBC and its Drivers  Connecting to Databases (Java’s Connection class)  Querying a.
Chapter 11 – Database-Oriented Middleware & EAI Database access is the key element to EAI, especially data-level EAI. Database oriented middleware is not.
Lecture The Client/Server Database Environment
JDBC Java API for Database Connectivity. Layout of this recitation Introduction to JDBC API JDBC Architecture Understanding the design of JDBC API –Classes.
The Client/Server Database Environment
ODBC Open DataBase Connectivity a standard database access method developed by Microsoft to access data from any application regardless of which database.
JDBC / ODBC JDBC is the java API that facilitate interaction of a java application with the DBMS. FIRST APPROACH:
Dale Roberts 8/24/ Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
Advance Computer Programming Java Database Connectivity (JDBC) – In order to connect a Java application to a database, you need to use a JDBC driver. –
Getting connected.  Java application calls the JDBC library.  JDBC loads a driver which talks to the database.  We can change database engines without.
JDBC Vs. Java Blend Presentation by Gopal Manchikanti Shivakumar Balasubramanyam.
September 6, 2015 Connecting Client Applications to Informix Databases using IBM Informix Connect and ODBC James Edmiston Database Consultant Quest Information.
Oracle8 JDBC Drivers Section 2. Common Features of Oracle JDBC Drivers The server-side and client-side Oracle JDBC drivers provide the same basic functionality.
Helena Pomezná, ciz034 St. skupina: L392 FEI, VŠB-TUO Ak. rok. 2002/2003 Download:
How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant/Quest Information Systems, Inc. Informix User Forum 2005 Moving Forward.
Beginning Databases with JDBC Mike Bradley Adapted from and notes by Kevin Parker, Ph.D.
Lecture On Database Analysis and Design By- Jesmin Akhter Lecturer, IIT, Jahangirnagar University.
Enterprise Java Beans Part I Kyungmin Cho 2001/04/10.
Dr R R DOCSIT, Dr BAMU. Basic Java : Introduction to JDBC 2 Objectives of This Session State what is Java Database Connectivity State different.
Designing and Developing WS B. Ramamurthy. Plans We will examine the resources available for development of JAX-WS based web services. We need an IDE,
Mainframe (Host) - Communications - User Interface - Business Logic - DBMS - Operating System - Storage (DB Files) Terminal (Display/Keyboard) Terminal.
JDBC – Java DataBase Connectivity. JDBC API Overview JDBC is Java API that allows the Java programmers to access database management system from Java.
JDBC. Preliminaries Database Database Collection of data Collection of data DBMS DBMS Database management system Database management system Stores and.
Accessing Database using JDBC. JDBC Objectives Gain basic knowledge of Java JDBC Become familiar with the basics of interacting with a database using.
WEB/DB1 DATABASE PROGRAMMING 3JDBC by the ASU Scholars.
Java Database Connectivity (JDBC). Topics 1. The Vendor Variation Problem 2. SQL and Versions of JDBC 3. Creating an ODBC Data Source 4. Simple Database.
Java Database Connectivity. Java and the database Database is used to store data. It is also known as persistent storage as the data is stored and can.
DB-16 : JTA Transactions in the RDBMS, What's Going on Down There? Deb Walz Principal Software Engineer.
JDBC Database Programming in Java Prepared by., Mrs.S.Amudha AP/SWE.
JDBC CS 124. JDBC Java Database Connectivity Database Access Interface provides access to a relational database (by allowing SQL statements to be sent.
Session 30 Basics of JDBC. Java Simplified / Session 30 / 2 of 33 Review A Swing menu consists of a menubar, menuitems and menus. Trees are used to depict.
JDBC CHAPTER-2. JDBC - Java Database Connectivity. JDBC from Sun Microsystems provides API or Protocol to interact with different databases. With the.
12/6/2015B.Ramamurthy1 Java Database Connectivity B.Ramamurthy.
JDBC
Copyright © Curt Hill Connectivity Communicating with the Database.
Java and Databases. JDBC Architecture Java Application JDBC API Data Base Drivers AccessSQL Server DB2InformixMySQLSybase.
COMP 321 Week 4. Overview Normalization Entity-Relationship Diagrams SQL JDBC/JDBC Drivers hsqldb Lab 4-1 Introduction.
UNIT III - JDBC JDBC Overview – JDBC implementation – Connection class – Statements - Catching Database Results, handling database Queries. Networking–
JDBC and SQLJ CIS 612 Spring JDBC JDBC is an API that enables database access from Java programs JDBC for DB access provides ◦ Portability across.
Connectivity Solutions from DataDirect™ John Goodson Vice President, DataDirect, R&D.
CSI 3125, Preliminaries, page 1 JDBC. CSI 3125, Preliminaries, page 2 JDBC JDBC stands for Java Database Connectivity, which is a standard Java API (application.
Basics of JDBC Session 14.
JDBC Chapter 1 JDBC Introduction
JDBC - Java Database Connectivity. JDBC provides Java applications with access to most database systems via SQL The architecture and API closely resemble.
Ch. NoNameMarks 01AWT24 02Networking18 03JDBC20 04Swing18 05Servlet20 Advance Java Programming.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Java Database Connectivity.
R EMAINING TOPICS IN JDBC Sagun Dhakhwa. O VERVIEW Introduction to JDBC API Types of JDBC Drivers Introduction to ODBC.
MQ Series Cross Platform Dominant Messaging sw – 70% of market
Prepared by Mehmet Küçüksayan Mustafa Ecmel Özdemir
DEPTT. OF COMP. SC & APPLICATIONS
JDBC Database Management Database connectivity
The Client/Server Database Environment
Mr. Harish Sharma Asst. Professor Dept. of CA & IT SGRRITS Dehradun
Interacting with Database
JDBC – ODBC DRIVERS.
Java Database Connectivity
MQ Series Cross Platform Dominant Messaging sw – 70% of market
ODBC and JDBC.
Java API for Database Connectivity
Introduction of Week 5 Assignment Discussion
Presentation transcript:

DB-1: Understanding and Leveraging the Latest ODBC and JDBC Technology What’s new in OpenEdge® 10.1A? Rob Steward Director of Software Development

© 2006 Progress Software Corporation2 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology Agenda  ODBC architecture changes  ODBC Unicode functionality  JDBC architecture changes  JDBC JTA support What’s New in 10.1A?

© 2006 Progress Software Corporation3 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology Agenda  ODBC architecture changes  ODBC Unicode functionality  JDBC architecture changes  JDBC JTA support What’s New in 10.1A?

© 2006 Progress Software Corporation4 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology ODBC “Classic” Architecture Application Code Driver Manager ODBC Driver A ODBC Driver B ODBC Driver C Network Lib Network Lib Network Lib ABC Data Protocol Wire Protocol

© 2006 Progress Software Corporation5 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology ODBC Wire Protocol Architecture Application Code Driver Manager ODBC Driver A ODBC Driver B ODBC Driver C ABC Data Protocol Wire Protocol OpenEdge Wire Protocol Driver Higher Performance No Dependencies Thin client install

© 2006 Progress Software Corporation6 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology OpenEdge Wire Protocol Advantages  Ease of Deployment  Versioning 10.1A will be forward compatible with future versions of the database  Better performance

© 2006 Progress Software Corporation7 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology How Database Middleware Works DBMS SERVER Packets sent from driver 2 Packets sent back from DBMS Server 3 DRIVER API CALL DATABASE NETWORK select * from employees where location = ‘boston’ Application makes a call 1

© 2006 Progress Software Corporation8 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology Why better performance? NETWORK SIMULTANEOUS Application makes a call Packets sent from driver Packets sent back from DBMS Server BUFFER Private BUFFER Only one network read to process all packets. This occurs simultaneously as the DBMS server sends more packets DRIVER API CALL DBMS SERVER DATABASE different sized packets

© 2006 Progress Software Corporation9 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology ODBC Wire Protocol Availability  New driver available in 10.1A! Compatible with 10.1A servers  Platforms Windows 98/Me/NT/2000/XP/2003 AIX Solaris HP-UX

© 2006 Progress Software Corporation10 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology Agenda  ODBC architecture changes  ODBC Unicode functionality  JDBC architecture changes  JDBC JTA support What’s New in 10.1A?

© 2006 Progress Software Corporation11 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology What is Unicode?  One character set standard to rule them all  A single encoding standard to represent “all” written characters-glyphs  Unicode 4.0 contains over 96,000 characters  Three Common Flavors UCS-2 (strictly 2 bytes) UTF-8 (1 to 4 bytes; preserves ASCII; favored by Unix) UTF-16 (UCS-2 + surrogates)

© 2006 Progress Software Corporation12 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology Why Unicode?  Internationalizes your code  Performance – can avoid costly character set translations

© 2006 Progress Software Corporation13 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology Unicode Support in the ODBC Standard  Unicode support added in version 3.5  Spec assumes UCS-2  Separate API calls for Unicode strings (“W” functions)  Separate data types for Unicode strings (SQL_C_WCHAR)  ODBC Driver Manager masks driver and application differences

© 2006 Progress Software Corporation14 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology What does Unicode Support Encompass at the ODBC API level?  Arguments to API functions/methods  String parameters  String results

© 2006 Progress Software Corporation15 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology How does Unicode work in ODBC?  Unicode App vs. non-Unicode app. “W” functions  Unicode Driver vs. non-Unicode driver. SQLConnectW exported?

© 2006 Progress Software Corporation16 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology How does Unicode work in ODBC? (cont.)  DM tries to make all possible combinations work. ANSI App w/ ANSI driver Unicode App w/ Unicode driver ANSI App w/ Unicode driver Unicode App w/ ANSI driver (obvious limitations) Unix Only: UTF8 app w/ UTF-16 driver. Unix Only: UTF-16 app w/ UTF8 driver.

© 2006 Progress Software Corporation17 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology Why are Character Set Conversions Bad?  Degrades performance.  Frequently data is lost (Substituted), or corrupted during conversions.  For example, here ’ s how the Euro character, “€”, is represented in various character sets: ISO8859-1: N/A Cp1252: 0x80 UCS-2/UTF-16: 0x20AC UTF-8 :0xE2A2AC

© 2006 Progress Software Corporation18 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology When are Conversions Necessary and Why?  Conversions by DM Non-Unicode apps Non-Unicode drivers  Conversions by Unicode Driver Between Unicode and DB codepage for SQL when DB ’ s codepage is not Unicode Conversions for parameters and result columns as necessary based on C type and SQL type

© 2006 Progress Software Corporation19 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology Agenda  ODBC architecture changes  ODBC Unicode functionality  JDBC architecture changes  JDBC JTA support What’s New in 10.1A?

© 2006 Progress Software Corporation20 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology Architecture differences in JDBC drivers The JDBC specification formally defines 4 different types of drivers Type 1: JDBC-ODBC bridge Type 2: partial Java™ driver Type 3: pure Java driver for database middleware Type 4: pure Java driver for direct-to- database

© 2006 Progress Software Corporation21 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology JDBC Architecture – Type 1 Authored by DataDirect Free with JDK JDBC 2.0 API For Prototyping ODBC Driver Manager ODBC Driver A ODBC Driver B ODBC Driver C ABC JDBC/ODBC Bridge Application Code

© 2006 Progress Software Corporation22 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology JDBC Architecture – Type 2 Application Code JDBC Driver A JDBC Driver B JDBC Driver C Network Lib Network Lib Network Lib ABC Platform Dependent

© 2006 Progress Software Corporation23 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology JDBC Architecture – Type 4 Application Code JDBC Driver A JDBC Driver B JDBC Driver C ABC OpenEdge 10.1A Type 4 Driver No Client Dependencies More Platforms Better Performance

© 2006 Progress Software Corporation24 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology JDBC Architecture  OpenEdge 10.1A Driver Type 4 JDBC 3.0 API CTS Certified Java Application Code JDBC Driver A JDBC Driver B JDBC Driver C ABC

© 2006 Progress Software Corporation25 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology OpenEdge Type 4 JDBC Advantages  Ease of Deployment  Versioning No dependence on native code  No platform dependence Any J2SE 1.4 or higher  Better performance

© 2006 Progress Software Corporation26 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology Agenda  ODBC architecture changes  ODBC Unicode functionality  JDBC architecture changes  JDBC JTA support What’s New in 10.1A?

© 2006 Progress Software Corporation27 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology What is JTA?  JTA is the Java Transaction API  JTA specifies standard Java interfaces between a transaction manager and the parties involved in a distributed transaction system: the resource manager, the application server, and the transactional applications.  JTA is based on the XA specification

© 2006 Progress Software Corporation28 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology Why is JTA important?  All common application servers support XA transactions through JTA and they will use them if necessary and available  If you need to enlist OpenEdge connections in a distributed transaction with some other data source

© 2006 Progress Software Corporation29 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology How Does JTA work? 1 UserTransaction javax.transaction.UserTransaction Provides the application the ability to control transaction boundaries. It starts a global transaction and associates the transaction with the calling thread. 2 TransactionManager javax.transaction.TransactionManager Allows the application server to control transaction boundaries on behalf of the application being managed. 3 XAResource javax.transaction.xa.XAResource A Java mapping of the industry standard XA interface.

© 2006 Progress Software Corporation30 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology A Distributed Transaction with JTA... xaDS = getDataSource(); xaCon = xaDS.getXAConnection("jdbc_user", "jdbc_password"); xaRes = xaCon.getXAResource(); con = xaCon.getConnection(); stmt = con.createStatement(); xid = new MyXid(100, new byte[]{0x01}, new byte[]{0x02});

© 2006 Progress Software Corporation31 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology A Distributed Transaction with JTA xaRes.start(xid, XAResource.TMNOFLAGS); stmt.executeUpdate("insert into test_table values (100)"); xaRes.end(xid, XAResource.TMSUCCESS); ret = xaRes.prepare(xid); if (ret == XAResource.XA_OK) { xaRes.commit(xid, false); }...

© 2006 Progress Software Corporation32 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology Questions?

© 2006 Progress Software Corporation33 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology Thank you for your time

© 2006 Progress Software Corporation34 DB-1: Understanding & Leveraging Latest ODBC and JDBC Technology