
Topic:
JDO/JDBC/SQLJ
Java Data Objects (JDO), Java Database Connectivity (JDBC) and SQLJ provide important Java-based database objects or connectivity to Enterprise Information Systems (EIS), whether it be Legacy or middleware.
O'Reilly Network articles about this topic:
Effective Unit Testing with DbUnit
(ONJava.com)
Writing unit tests first can be impractical when your code will depend on access to a database. Enter DbUnit, which allows you to write simple XML files to fill in for the yet-to-be populated database for testing purposes.
Hibernate Your Data
(ONJava.com)
Hibernate can persist any kind of Java object, manipulate a hierarchy of objects, handle collections, and work with transactions. Davor Cengija shows you how.
Stored Procedures for Java Programmers
(ONJava.com)
You can build your application on top of a persistence layer such as EJB, but that's not your only option. Another alternative is stored procedures. Nic Ferrier explains how they work and why the common objection -- portability -- doesn't always apply.
Object-Relational Mapping with Apache Jakarta OJB
(ONJava.com)
Object persistence is important in enterprise applications, but mapping class hierarchies to relational databases can be tricky. Enter OJB, an open source persistence framework. Charles Chan demonstrates nearly-painless techniques for saving your objects.
"Castor JDO": Simply False Advertising
(ONJava.com)
This expert perspective lays it on the line: Exolab's Castor JDO product does not support the JDO standard. The use of the acronym is causing confusion in the marketplace, and flirts with a violation of Sun's Java trademark.
Using Castor JDO for SQL Mapping
(ONJava.com)
An in-depth look at using Castor's marshalling engine to do data binding of Java objects to tables, rows, and columns in an SQL database.
An Introduction to JDBC, Part 3
(ONJava.com)
In part three of this four-part excerpt on JDBC from Java Enterprise in a Nutshell, learn about error handling, prepared statements, BLOBs and CLOBs.
Flawed Understanding of JDO Leads to FUD
(ONJava.com)
In this scathing response to Don Bales' recent critique of Java Data Objects, David Jordan offers proof that JDO does not regard SQL as a "bad thing," yields shorter and simpler code, and is vendor-neutral.
An Introduction to JDBC, Part 2
(ONJava.com)
Part Two of this excerpt from Java Enterprise in a Nutshell focuses on database connection, statements and results.
An Introduction to JDBC, Part 1
(ONJava.com)
In this excerpt from Chapter 2 of Java Enterprise in a Nutshell, the authors introduce the JDBC architecture.
Java API Map
(ONJava.com)
Is the world of Java getting a little unweildy for you? Use our Java API map and directory to track all significant Java platforms and respective Java APIs. Includes the JAX Pack and MIDlets.
DDL Statements and Transactions
(ONJava.com)
Learn how to add SQLJ statements to Java programs that use the embedded SQL Data Definition Language.
JDO vs. Entity Beans: A Modest Proposal
(ONJava.com)
The Java Data Objects (JDO) approach can replace performance-poor Entity Beans in many cases. But JDO is not enough; here's a proposal for improving Entity Beans without sacrificing their server-side power.
Database Access Using Lightweight Applets
(ONJava.com)
Using lightweight applet technology, you can bring the full weight of Java's GUI capability and the advantages of client-side dynamic database access to your Web
applications. Because the technology employs HTTP to communicate with a database via SqlServlet, lightweight applets perform well, yet remain small enough
to have acceptable download times.
Java Programming with Oracle JDBC: Performance
(ONJava.com)
When it comes to JDBC performance issues, there are two major factors to consider: performance of the database structure and the SQL statements used against it and relative efficiency of the different ways you can use the JDBC interfaces to manipulate a database. This excerpt from Java Programming with Oracle JDBC explores these.
Expiring Data with Hashbelts
(ONJava.com)
The final installment in this series on automatic data expiration shows that hashbelts are a new data structure that satisfies all of the requirements for data expiration.
DML Statements
(ONJava.com)
Learn how to add SQLJ statements to your Java programs that use embedded SQL Data Manipulation Language (DML) statements.
Using Java Data Objects
(ONJava.com)
The JDO standard frees developers from having to worry about database operations, letting them focus on business logic. This article builds a sample address book app in JDO.
The Hashbelt Data Structure
(ONJava.com)
William Grosso continues his Data Expiration series by focusing on the 'hashbelt' algorithm, which is a generic data structure adaptable to a wide variety of time-sensitive data problems.
The Debate Over Java Data Objects
(ONJava.com)
The Java Data Objects spec is intended to free developers from worrying about mapping objects to databases. But not everyone thinks it's a great idea. Vendors like Thought Inc. take issue with JDO and think they have better solutions. Dion Almaer weighs in on the issues.
Dynamic Database Access from Client-Side JavaScript
(ONJava.com)
Imagine the advantages of being able to dynamically access a database from
client-side JavaScript. You could dynamically query a database from JavaScript for client-side field validation, or dynamically populate a drop-down select list, to name just a few possibilities. In fact, you can do this with the help of an applet-servlet pair. This article describes the applet-servlet pair architecture and offers several sample applications.
Introducing Automatic Data Expiration
(ONJava.com)
How you choose to expire data can make the difference between an application that scales to enterprise quality and one that doesn't. In the first of this three-part series, William Grosso covers the fundamentals of data expiration, and presenting solutions of increasing functionality.
Database Connections and SQLJ Statements
(ONJava.com)
Jason Price describes how to connect to a database and embed SQL statements in your Java programs using SQLJ.
Top Ten Oracle JDBC Tips
(ONJava.com)
Java Programming with Oracle JDBC author Don Bales offers his top ten tips for squeezing performance from the Oracle JDBC.
Unlocking the True Power of Entity EJBs
(ONJava.com)
Tyler Jewell explains the real power of entity EJBs: developers can write once and deploy many times, with each deployment customized for unique data scenarios.
Setting Up Your Environment to Develop SQLJ Programs
(ONJava.com)
Jason Price describes how to set up your environment to develop SQLJ applications, and he demonstrates a "Hello World" program that uses SQLJ to access a database.
Tuning JDBC: Measuring JDBC performance
(ONJava.com)
Many Java apps are dependent on Java Database Connectivity, but how do you measure JDBC's performance, and which subsystems need optimizing?
Learning EJB QL
(ONJava.com)
Learn how the addition of EJB QL to EJB 2 justifies the distributed component architecture as the standard way of defining queries, which allows database applications to be more portable.
Java Programming with Oracle SQLJ: Contexts and Multithreading
(ONJava.com)
A multithreaded program is one that is able to carry out several tasks in parallel using Java threads. As you will see in this excerpt from Java Programming with Oracle SQLJ, execution contexts are very important when writing a multithreaded SQLJ program.
Getting Up To Date with JDBC API
(ONJava.com)
Object Computing's Jeff Brown covers the JDBC 3.0 specification in its proposed final draft form, which promises to add more robust transactions by way of savepoints, a number of resource pooling
enhancements, retrieval of auto-generated keys and a lot more.
Using Tomcat 4 Security Realms
(ONJava.com)
In part 4 of his Using Tomcat series, James Goodwill covers Tomcat 4, focusing on security realms using both memory and JDBC realms (with a MySQL database example).
Other documents about this topic
Below are other references available on the web for this topic. Since other sites may change their links, please let us know if you find any that may need to be updated.
SQLJ Resource
SQLJ Overview
The ANSI SQLJ standard has three parts:
SQLJ Part 0: ANSI 9075, "Part 10: Object Level Bindings (SQL/OLB)"
Syntax for embedding SQL calls in a Java program, similar to embedded SQL in "C", Fortran, etc. The hybrid Java/SQL program is precompiled to an equivalent pure Java program using JDBC calls.
I.e. SQLJ Part 0 is equivalent to JDBC calls, with an embedded syntax.
Note that the same document is referred to as "SQLJ Part 0" and as "SQL Part 10". This is just a quirk of standards naming.
SQLJ Part 1: NCITS 331.1, "SQL Routines using Java"
SQL extensions for calling Java static methods as SQL stored procedures and functions.
SQLJ Part 2: NCITS 331.2, "SQL Types using Java"
SQL extensions for using Java classes as SQL datatypes in SQL columns.
I.e., SQLJ Part 0 supports SQL-in-Java, and Parts 1 & 2 support Java-in-SQL.
Sybase plans for SQLJ support
SQLJ Part 0
We have focussed on SQLJ Part 1 & 2 capabilities, since these add new extension capabilities to SQL.
SQLJ Part 0 provides convenient syntax for calling SQL in Java.
SQLJ Part 0 is functionally equivalent to JDBC calls, and it has the drawback of introducing the hybrid syntax and precompiler step into the development process.
We don't yet support the Part 0 precompiler, but we are considering it for the follow-on of ASE 12.5.
SQLJ Parts 1 & 2
Sybase first introduced support for using Java in SQL in the ASE 12.0 and ASA 6.0 releases. This included the following:
Installing Java Jar files in the ASE/ASA servers.
Calling Java static methods as SQL functions and procedures.
Using Java classes as SQL datatypes.
At the same time we were developing these releases, Sybase was actively participating in the SQLJ effort. We contributed our product specifications as a starting point for SQLJ Part 1 & Part 2, and served as document editor for both Parts 1 & 2.
When The SQLJ Part 1 and Part 2 standards were finished, they were very similar to the Sybase features, with the following differences:
Our Java support in ASA 6.0 and ASE 12.0 used Java names directly in SQL statements and declarations. The SQLJ standard instead included extensions to CREATE PROC and CREATE TYPE to allow you to specify an SQL alias name for a Java method or class.
We are supporting the SQLJ CREATE PROC/FUNCTION aliases in ASE 12.5, and are considering supporting the SQLJ CREATE TYPE aliases in the subsequent release.
ASA supports both the SQLJ CREATE PROC/FUNCTION and CREATE TYPE aliases.
Note that this support for the SQLJ CREATE aliases is an upward compatible extension to our original Java facilities. We will support both the SQLJ CREATE aliases and the simple Java names. The choice between them is a matter of individual preference.
Our initial Java support in ASA 6.0 and ASE 12.0 didn't include returning SQL-style result sets or output mode stored-procedure parameters. Both of these capabilities are now supported in ASA and in the new ASE 12.5 release.
[Source: Sybase, SQLJ.org]
Sybase White Papers/Tech Papers
Sybase White Papers, containing info on projects related to Java, JDBC, SQLJ and development for their Web Application Server.
[Source: Sybase]
JDBC 2.0 Tutorial
This module introduces the fundamental concepts of JDBC and gives you a working knowledge of the major
elements of the core JDBC 2.0 API. The course is standards-based and uses best practices to demonstrate
How-Tos useful to the field developer.
After completing this module you will understand:
The rationale for the JDBC API
The fundamental concepts involved in database and JDBC applications
How JDBC classes work together to connect to and communicate with a database
A number of intermediate-level JDBC and database concepts
How to use selected capabilities new in JDBC 2.0
[Source: jGuru/Java.Sun]
Java Data Objects
JDO (Java Data Objects) is a specification for transparent persistence being developed as JSR-000012 in the Java Community Process. Transparent persistence allows developers to store their Java objects in transactional data stores "transparently", meaning that they do not need to explicitly manage the field-by-field storage and retrieval to and from the data store.
[Source: theserverside.com]
EJB-QL
This is a community site dedicated to EJB-QL or the Enterprise JavaBeans Query Language. It contains the following:
* EJB-QL syntax reference
* ejb-jar.xml reference
* other nice things...
|