Java IoT Authors: Pat Romanski, Elizabeth White, Liz McMillan, Yeshim Deniz, Mehdi Daoudi

Related Topics: Java IoT

Java IoT: Article

Universal Database Access for Java

Universal Database Access for Java

Java has caused great excitement with its ability to animate Web pages. However, Java is a full-fledged programming language that is arguably the only language suitable for net-centric business applications. The vast majority of business applications require database access and we can expect Java applications to be no different.

JavaSoft created the JDBCª (Java Database Connection) specification, recognizing the urgency of a standard DBMS API for Java. JDBC enables the Java developer to connect to a SQL-capable data source, send SQL statements to the data source and return status messages and data records resulting from the SQL execution. JDBC also offers advanced functionality such as automatic conversion of different database data types to Java data types, the streaming of large data records, cursors and multiple result data sets.

JavaSoft has taken the first step towards assuring conformance of JDBC implementations with the "JDBC COMPLIANTª" designation. To use this designation, a JDBC driver must support the ANSI SQL 2 Entry Level standard and have passed the conformance tests provided by JavaSoft [2]. JDBC offers the business application true platform and database-independent access to the current investment in databases.

At last count, there were over twenty different JDBC implementations available from a number of vendors [1]. I will explore the major architectural approaches for implementing JDBC for networked application and then demonstrate how a JDBC implementation based on CORBA and IIOP realizes the best features of all of these different approaches.

JDBC Functionality
JDBC uses a class hierarchy for database objects that is in the java.sql.* package of the JDK 1.1. The "JDBC Guide: Getting Started" presents an excellent detailed coverage of the JDBC classes and how to use them [2]. There are four major areas of functionality of a JDBC driver implementation.
1. DBMS Connection: Manage the connection to a database
2. SQL: Transmit and manage submission of SQL to the DBMS for execution.
3. Exception Management: Manage exception and status events resulting from SQL execution
4. Data Transmission: Marshall data output from database, transport it back to requesting JDBC client and convert from native database data types to Java data types.

Since JDBC is a specification, there is considerable freedom for each vendor to distinguish itself on its strategy for implementing each of these major functional areas as well as extra value extensions. All these strategies divide themselves into one of two categories: client-centric or net-centric JDBC drivers.

The Client-Centric JDBC Driver
The client-centric JDBC driver is located entirely on the local client platform. Client-centric JDBC drivers take advantage of existing Microsoft Open Database Connectivity (ODBC) or DBMS vendor-specific drivers because of the wide availability and established installed base. See Figure 1 for a typical client-centric JDBC driver architecture.

A significant drawback of using the installed base of ODBC or vendor-specific drivers is that they are not pure-Java implementations. For reasons of security, many browsers do not allow or place very stringent limitations on access to foreign binaries. For example, Netscape Navigator 3.x or Communicator 4.x require that any Windows or UNIX binary be implemented using the Netscape Java Runtime Interface (JRI). The installed base of ODBC drivers on Windows desktops and any JDBC driver then uses ODBC drivers cannot be accessed from Netscape browsers.

Sybase jdbcCONNECT is a notable exception to the current crop of client-centric JDBC drivers[3]. Sybase has created a pure Java implementation of their proprietary Tabular Data Stream (TDS) protocol. Running on top of the TCP/IP network protocol, TDS enables jdbcCONNECT to directly access Sybase SQL Server, Replication Server and OmniCONNECT. jdbcCONNECT should have a relatively high performance compared to ODBC drivers.

In general, throughput performance in a distributed system is determined by how many times the data must be copied as it travels from source to destination. The more middleware layers to transverse, the more times a data packet is copied, resulting in a lower throughput performance. You can expect that the database vendors will have a natural advantage in providing the fastest drivers for their databases.

Client-Centric Advantages

  • Client-centric JDBC/ODBC drivers distinguish themselves by a very low cost of entry. ODBC drivers are a de-facto standard for PC database access. Java applications can use the same local driver used by the current client-server installed base
  • ODBC supports a wide range of databases at a very low cost. Windows 95 and Windows NT includes ODBC drivers for Access, dBASE, Foxpro, Paradox, Excel, and Microsoft SQL Server. Intersolv offers ODBC drivers for over twenty databases, including Informix, Ingres, Oracle, and Sybase for a very low price.

    Client-Centric Disadvantages

  • A JDBC driver that is not a pure Java implementation, such as a JDBC/ODBC hybrid, will not work with a Web browser.
  • Applets that use client-centric JDBC are restricted to databases located on the Web server from which the applet originated.
  • Client-centric JDBC driver installations have a very high cost of ownership. Each client platform must install, administrate and maintain a set of drivers for accessing databases. Rapidly evolving browsers, Java SDK, Java class libraries and Intranet security cause rapid obsolescence of a local driver installation. Additionally, new DBMS versions will usually require updates for all JDBC driver installations.

    The Net-Centric JDBC Driver
    The net-centric JDBC driver avoids all the disadvantages of non-Java binaries by separating the JDBC driver into a JDBC Server and a pure-Java JDBC Client. The JDBC Client implements the minimum necessary logic to pass SQL over the network to the JDBC Server and receive the data back. The JDBC Server manages the direct connection to the DBMS, manages any exception and status events resulting from SQL execution and finally packages the data for transmission over the network to the JDBC Client.

    The JDBC Client usually has a small footprint of 200KB or less. Most of the Java code of the JDBC Client implementation is dedicated to unpacking the data received from the JDBC Server from network packets into Java data types. See Fiugre 2 for a typical net-centric JDBC driver architecture.

    The net-centric JDBC driver has all the benefits of a three-tier architecture. Access control, load-balancing, DBMS-specific extensions, encryption and compression can be implemented at the JDBC Server tier between the JDBC Client and the DBMS.

    The net-centric architecture is particularly suitable for enterprise applications that have demanding performance and scalability requirements. Multiplexing management among several replicated databases is best done by the JDBC Server. Products are appearing on the market that support data warehouse features such as catalog and query caches. Other JDBC enterprise features include DBMS connection caching, logging and administration facilities.

    XDB's JetExpress is one of the first products to market with a multi-tier JDBC architecture[4]. JetExpress has a pure Java JDBC Client that also offers an ODBC API. The ODBC API offers functionality missing in the JDBC specification, such as block reads, backward scrolling cursors, and variable binding. The JetExpress JDBC server offers database connectivity via ODBC drivers and a XDB-based gateway to DB2/MVS and other DRDA compliant data sources. JetExpress offers a high performance catalog by creating an image of the target database's system catalog tables on the gateway. XDB reports cases of application speedup of more than 300%[4].

    The Internet and the enterprise Intranet have introduced a new problem, rarely encountered by the LAN-based client/server application - the firewall. All untrusted protocol connections are blocked at a properly configured firewall. Specific Internet protocols, such as HTTP, FTP and SMTP are "trustworthy" because they have specific proxies that filter, control and log protocol traffic for a specific TCP/IP port across the firewall. Unfortunately, each JDBC implementation requires the development of a new proxy as the protocol exchange between JDBC client, JDBC server and DBMS is unique.

    If a proxy is not available for your brand of JDBC, then firewall security must be relaxed so that a JDBC application can access an enterprise database behind the firewall. Of course, it is a rare organization that can allow a compromised firewall configuration. You can expect JDBC to be blocked at the first firewall it encounters.


  • Net-centric JDBC driver installations have a lower cost of ownership than client-centric JDBC drivers. A pure Java JDBC client implementation has all the advantages of Java's "Write-once, Run Anywhere" administration and maintenance benefits. It is installable, portable and secure on all Java capable platforms, including new network computers from Sun and Oracle.
  • Applets that use the JDBC Client are restricted only to a JDBC Server located on the Web server from which the applet originated. The JDBC Server may in turn access databases that are not on the Web server.
  • Net-centric JDBC drivers have a three-tier architecture that is suitable for demanding enterprise applications. Compression, encryption, DBMS connection caching, query caching, logging, administration, access control, load-balancing and DBMS- specific extensions are implemented at the JDBC Server tier between the JDBC Client and the DBMS.


  • A pervasive problem with all JDBC products is firewall security. Firewall proxies are usually not available for the specific JDBC implementation. The enterprise is faced with the difficult choice of prohibiting access to enterprise databases behind the firewall or compromising firewall security. A third undesirable alternative is accepting a substantial reduction of quality of service using HTTP tunneling.

    The CORBA-Based JDBC Driver
    A substantial amount of a net-centric JDBC driver implementation is dedicated to the communication between its distributed components. Establishing connections, handling a dirty client, packing and unpacking data from the wire, is all more or less accomplished by programming directly at the TCP/IP socket level. JDBC drivers would benefit greatly from being implemented on a pervasive distributed computing infrastructure.

    CORBA¨ (Common Object Request Broker Architecture) is a widely implemented and deployed infrastructure on which we can build Java-based net-centric applications [5]. CORBA represents a paradigm shift in middleware - an industry-wide agreement on distributed object interaction protocols and framework services. The promise of the CORBA-based applications is to enable developers to "snap together" applications by mixing and matching prefabricated "plug & play" software components. CORBA-based component software is universally accessible and interoperates across boundaries of operating systems, networks, languages, development tools and interface styles.

    The net-centric JDBC driver migrated to CORBA becomes an assembly of collaborating components. The CORBA Interface Definition Language (IDL) is used to define a JDBC Server's interface. The CORBA JDBC Server provides operating system and programming language independent interfaces to all the services and clients that reside on a CORBA distributed object bus. See Figure 3 for a typical CORBA-based net-centric JDBC driver architecture.

    The CORBA JDBC Server interface specification is available at runtime or compile-time from the CORBA Interface Repository. This is an essential feature for component software to be able to bind together at run-time. Also, interface self-description is an essential capability for JavaBeans and realizing component reusability.

    The Internet Inter-ORB Protocol (IIOP) is an emerging de-facto standard candidate for ubiquitous inter-object communication protocol for all CORBA implementations using TCP/IP. IIOP was originally motivated to standardize interoperability between different CORBA vendor implementations. However, IIOP has been rapidly adopted because it defines a standard set of message contents, formats and semantics for transmitting requests and replies between objects. Given the specification of an object's methods and data structures, it manages all the packing and unpacking of the method call and object data structures. IIOP is a separable CORBA runtime service and is fast, reliable and has a very small footprint.

    Leading CORBA vendors, such as IONA, IBM, Sun and Expersoft have shipping IIOP implementations, while other CORBA suppliers, such as DEC and HP, have announced release commitments. By providing free versions of Java IIOP implementations, Netscape and IONA Technologies have taken a leadership role in providing a high performance, open standard, inter-object communication protocol for the Intranet and Internet distributed application.

    Earlier, we discovered that proprietary JDBC connection protocols are blocked at the first firewall encountered. Undesirable workarounds suffer from reduction of quality of service using HTTP tunneling or having to relax firewall security. IIOP-based JDBC implementations eliminate the firewall problem. Since IIOP is fast becoming a de facto Internet connection protocol, you can expect IIOP firewall proxies to be widely deployed.

    I-Kinetics' OPENjdbc is the first CORBA-based JDBC product to appear on the market[7]. OPENjdbc is a pure Java JDBC client that connects via IIOP to the DataBrokerª, a CORBA JDBC Server. The product ships with IONA's CORBA 2.0 and IIOP compliant Orbix runtime. IIOP firewall proxy support is provided by IONA's Wonderwall, which offers trustworthy access management and logging at the object method level[6]. Figure 4 shows the architecture for OPENjdbc, a pure CORBA net-centric JDBC driver.

    DataBroker provides a CORBA IDL interface assuring multi-language, platform-independent interface to all CORBA capable services and applications. In addition to Java, the JDBC IDL interface supports C, C++, SmallTalk, ADA and any other language for which an IDL compiler is available. Multi-language support is crucial for integrating the existing enterprise investment as Java and non-Java components can be assembled to create multi-tier applications.


  • Very low cost of ownership - The CORBA-based JDBC driver has all of Java's "Write-once, Run Anywhere" administration and maintenance benefits and all of CORBA's enterprise distributed computing infrastructure strengths. Server based pricing and no per user license costs eliminates client license management.
  • Very low startup costs - The startup cost is the cost of a CORBA JDBC Server. A free CORBA JDBC Client license is available from I-Kinetics[7]. An IIOP client license is free from IONA Technologies and is included in Netscape's Web browsers and Web servers as part of Open Network Environment (ONE).
  • The high costs and risks of proprietary middleware and network protocols are eliminated. The use of open standards, such as IIOP, CORBA and Java, protects against being locked into a single platform or vendor solution. CORBA and IIOP are pervasively available on every leading desktop and server platform. Continual support and advancement of IIOP are insured by industry-wide adoption. Key areas where the IIOP specification is being advanced are firewall security, compression and network management.
  • IIOP-based distributed applications can be securely and feasibly managed using the large installed base of firewalls. IIOP firewall proxies with advanced filter, control and logging features are available. For example, IONA's Wonderwall firewall proxy offers trustworthy access management and logging at the object method level.
  • Advanced distributed computing features such as threading, directory services, interface repository and multi-language support are basic features of a CORBA-based JDBC implementation.
  • The CORBA JDBC Server provides an IDL interface assuring multi-language, platform- independent interface to all CORBA capable services and applications. In addition to Java, the JDBC IDL interface supports C, C++, SmallTalk, ADA and any other language for which an IDL compiler is available.
  • Advanced features such as DBMS server multiplexing, logging, query caching and triggers can be implemented using CORBAServices, such as Events, Transactions, Persistence, Concurrency and Externalization.


  • JDBC extensions are required to provide type safety and higher performance through compile time use of DBMS schema. Currently, DBMS vendor support of SQL-based stored procedures can satisfy some of this need. A complete solution requires Java-based stored procedures and access to the DBMS internals.

    JavaSoft created the JDBCª (Java Database Connection) specification, recognizing the urgency of a standard DBMS API for Java. JDBC enables the net-centric business application true platform and database independent access to the enterprise database investment.

    CORBA-based JDBC will be among the first "killer applications" for the net-centric enterprise information system. It delivers the promise of significantly lower cost of ownership for enterprise systems. CORBA is quickly becoming pervasively available on every leading desktop and server platform in an extraordinarily short period of time. This is driven by the commitment of such technology leaders as IBM, I-Kinetics, IONA technologies, Netscape, Oracle and Sun. What is most significant is that Java and CORBA together provide a path for the enterprise to scale up existing client/server applications to very large, pervasively available, multi-tier net-centric applications.

    1. http://splash.javasoft.com/jdbc/jdbc.drivers.html
    2. Pre-press copy of JDBC Developer Guide:
    3. http://www.sybase.com/products/internet/jdbcconnect/jdbcdata.html
    4. XDB JetConnect Whitepaper http://www.xdb.com/wpapers/jetx11dm.htm
    5. You can obtain CORBA specifications in detail at http://www.omg.org as well as follow the latest specification developments in CORBAservices, such as Security, Event, Transaction, Persistence and Concurrency; CORBAfacilities, such as System Management, Workflow and Agents;CORBAdomains, such as CORBAmed (medical) and CORBAfinance.
    6. "IIOP on the Internet Whitepaper", IONA Technologies Ltd. http:/www.iona.ie
    7. http://www.i-kinetics.com
    8. JDBC Specification: http://splash.javasoft.com/jdbc/jdbc.ps (postscript) or http://splash.javasoft.com/jdbc/jdbc.pdf (Acrobat)
    9. Java Programmer Documentation: http://www.javasoft.com/doc/programmer.html

    Also, I highly recommend these two books for quickly and deeply developing your knowledge of CORBA: "The Essential Distributed Objects Survival Guide", Robert Orfali, Dan Harkey and Jeri Edwards, John Wiley and Sons, Inc., 1996. "CORBA Fundaments and Programming", Editor Jon Siegel, John Wiley and Sons, Inc.,1996.

  • More Stories By Dr. Bruce H. Cottman

    Dr. Cottman is founder and CEO of I-Kinetics and is founder and Chairman of the BomponentWare Consortium. As M.I.T. Lincoln Laboratory principal research staff, he designed and deployed one of the first distributed object management frameworks. As President and then later V.P. of R&D, he led the ACCESS and SOCIAL distributing computing projects, resulting in the successful CORBA-like commercial products, MetaCourier and ObjectExpress. In 1991, Dr. Cottman becamse a CORBA convert, sold his Symbiotics holdings and formed I-Kinetics, which is a leading provider of enterprise component software and tools.

    Comments (0)

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

    IoT & Smart Cities Stories
    The platform combines the strengths of Singtel's extensive, intelligent network capabilities with Microsoft's cloud expertise to create a unique solution that sets new standards for IoT applications," said Mr Diomedes Kastanis, Head of IoT at Singtel. "Our solution provides speed, transparency and flexibility, paving the way for a more pervasive use of IoT to accelerate enterprises' digitalisation efforts. AI-powered intelligent connectivity over Microsoft Azure will be the fastest connected pat...
    There are many examples of disruption in consumer space – Uber disrupting the cab industry, Airbnb disrupting the hospitality industry and so on; but have you wondered who is disrupting support and operations? AISERA helps make businesses and customers successful by offering consumer-like user experience for support and operations. We have built the world’s first AI-driven IT / HR / Cloud / Customer Support and Operations solution.
    Codete accelerates their clients growth through technological expertise and experience. Codite team works with organizations to meet the challenges that digitalization presents. Their clients include digital start-ups as well as established enterprises in the IT industry. To stay competitive in a highly innovative IT industry, strong R&D departments and bold spin-off initiatives is a must. Codete Data Science and Software Architects teams help corporate clients to stay up to date with the mod...
    At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with expanded DevOpsSUMMIT and FinTechEXPO programs within the DXWorldEXPO agenda. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throug...
    Druva is the global leader in Cloud Data Protection and Management, delivering the industry's first data management-as-a-service solution that aggregates data from endpoints, servers and cloud applications and leverages the public cloud to offer a single pane of glass to enable data protection, governance and intelligence-dramatically increasing the availability and visibility of business critical information, while reducing the risk, cost and complexity of managing and protecting it. Druva's...
    BMC has unmatched experience in IT management, supporting 92 of the Forbes Global 100, and earning recognition as an ITSM Gartner Magic Quadrant Leader for five years running. Our solutions offer speed, agility, and efficiency to tackle business challenges in the areas of service management, automation, operations, and the mainframe.
    The Jevons Paradox suggests that when technological advances increase efficiency of a resource, it results in an overall increase in consumption. Writing on the increased use of coal as a result of technological improvements, 19th-century economist William Stanley Jevons found that these improvements led to the development of new ways to utilize coal. In his session at 19th Cloud Expo, Mark Thiele, Chief Strategy Officer for Apcera, compared the Jevons Paradox to modern-day enterprise IT, examin...
    With 10 simultaneous tracks, keynotes, general sessions and targeted breakout classes, @CloudEXPO and DXWorldEXPO are two of the most important technology events of the year. Since its launch over eight years ago, @CloudEXPO and DXWorldEXPO have presented a rock star faculty as well as showcased hundreds of sponsors and exhibitors! In this blog post, we provide 7 tips on how, as part of our world-class faculty, you can deliver one of the most popular sessions at our events. But before reading...
    DSR is a supplier of project management, consultancy services and IT solutions that increase effectiveness of a company's operations in the production sector. The company combines in-depth knowledge of international companies with expert knowledge utilising IT tools that support manufacturing and distribution processes. DSR ensures optimization and integration of internal processes which is necessary for companies to grow rapidly. The rapid growth is possible thanks, to specialized services an...
    At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with expanded DevOpsSUMMIT and FinTechEXPO programs within the DXWorldEXPO agenda. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throug...