Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 35721 invoked from network); 5 Apr 2010 16:36:37 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Apr 2010 16:36:37 -0000 Received: (qmail 34630 invoked by uid 500); 5 Apr 2010 16:36:37 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 34492 invoked by uid 500); 5 Apr 2010 16:36:37 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 34485 invoked by uid 99); 5 Apr 2010 16:36:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Apr 2010 16:36:37 +0000 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=FREEMAIL_FROM,HTML_FONT_FACE_BAD,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of m.v.lunteren@gmail.com designates 74.125.92.26 as permitted sender) Received: from [74.125.92.26] (HELO qw-out-2122.google.com) (74.125.92.26) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Apr 2010 16:36:31 +0000 Received: by qw-out-2122.google.com with SMTP id 3so1392547qwe.13 for ; Mon, 05 Apr 2010 09:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:content-type; bh=j7YdniN01CRSn4UfL6bQoQwafN+QnW+jEA3I6TvE4OY=; b=PGkHWIOFX4X/ZVCdBIctRK0fQ2fZDsGn+TpnYhHvYs2Y6JLDTCRZibykSD+ctDGOd4 XcaM3zOX6VQ40AyLiwlKYBaUHPCUsMwLqchmGzaJLUTbpYqvS3g2FXQZhwUn1k0vqZQI JTeqGdrBADMOJu/xSEIj9L/LS+oxKAvMZqpOw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=xMbhjcUWXFKDd8MFP1IoeX/3HyezeBTxBUY6P40OB+dJbi2GeHLigXzIVY/oKOlkbG X1u3rzcXRND5864mrzZaomIKwMB9XubLKKoxUU7ABFMlOBgZKhGMFgY6cJ0TcZx/lKCR 3hU9GO7TV5yG4v36Yu4bX8St3mszaZk0Ies1g= MIME-Version: 1.0 Received: by 10.229.215.131 with HTTP; Mon, 5 Apr 2010 09:36:10 -0700 (PDT) In-Reply-To: References: Date: Mon, 5 Apr 2010 09:36:10 -0700 Received: by 10.229.218.21 with SMTP id ho21mr9673141qcb.79.1270485370228; Mon, 05 Apr 2010 09:36:10 -0700 (PDT) Message-ID: Subject: Re: SQLXML Research report From: Myrna van Lunteren To: derby-dev@db.apache.org Content-Type: multipart/alternative; boundary=0016362842fa2f50ff04837fed16 --0016362842fa2f50ff04837fed16 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2010/4/3 =D0=AF=D0=BD =D0=9F=D1=80=D0=BE=D0=B3=D1=80=D0=B0=D0=BC=D0=BC=D0= =B8=D1=81=D1=82 > While figuring out necessary information about SQLXML, I found that it i= s > a JDBC 4 issue, according to SQL 2003(?) standard specification. I found > following databases containing SQLXML implementation: > > > > SQL Server 2008 > > HyperSQL > > PostgreSQL > > > > Other databases have XML support in SQL syntax, for example H2 database, > but I haven't found anything about SQLXML in their JDBC API > > > > So I digged a bit in HyperSQL API Javadoc, and here is what I've found in > org.hsqldb.jdbc.JDBCSQLXML.html: > > > > > > =E2=80=9C*HSQLDB-Specific Information:* > > > > Starting with HSQLDB 1.9.0, a rudimentary client-side SQLXML interface > implementation (this class) is supported for local use when the product i= s > built and run under JDK 1.6+ and the SQLXML instance is constructed as th= e > result of calling JDBCConnection.createSQLXML(). > > > > SQLXML instances retrieved in such a fashion are initially write-only, wi= th > the lifecycle of read and write availability constrained in accordance wi= th > the documentation of the interface methods. > > > > When build and run under JDK 1.6+, it is also possible to retrieve > read-only SQLXML instances from JDBCResultSet.getSQLXML(...), given that > the underlying data can be converted to an XML Document Object Model (DOM= ). > > > > However, at the time of this writing (2007-06-12) it is not yet possible > to store SQLXML objects directly into an HSQLDB database or to use them > directly for HSQLDB statement parameterization purposes. This is because = the > SQLXML data type is not yet natively supported by the HSQLDB engine. > Instead, a JDBCSQLXML instance must first be read as a string, binary inp= ut > stream, character input stream and so on, which can then be used for such > purposes. > > > > Here is the current read/write availability lifecycle for JDBCSQLXML: > > > > Origin > > Initially > > After 1st Write > > After 1st Read > > After 1st Free > > *org.hsqldb.jdbc.JDBC**Connection**.createSQLXML()* > > Write-only > > Read-only > > Not readable or writable > > Not readable or writable > > *org.hsqldb.jdbc.JDBC**ResultSet**.getSQLXML(...)* > > Read-only > > N/A > > Not readable or writable > > Not readable or writable > > .=E2=80=9D > > > > My conclusions: > > 1. Hence a difference in class purpose, between JDBCConnection & > JDBCResultSet > > =E2=97=A6 JDBCConnection is obviously dictates data exan= ge mode. > Looks similar to global XML mode in MySQL, stating from version 5 > > =E2=97=A6 JDBCResultSet implies that some general SQL re= quest is > performed already. An that is *exactly what I was seeking* for: > > > > So I continued my lookup and found this in HyperSQL source code: > > [...] > John, I am not a lawyer, but I frown on the copying without license notice of exact source code. I frown on copying the source code altogether. Please be more careful. I know HyperSQL is also open source, but I rely on our derby community being very circumspect about what license we use and accept. The HyperSQL license is *not* the apache license, and I do not even want to see their source code. When you're doing further work on this, please be sure not to copy this code. Thank you. Myrna van Lunteren --0016362842fa2f50ff04837fed16 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

2010/4/3 =D0=AF=D0=BD =D0=9F=D1=80=D0=BE=D0=B3= =D1=80=D0=B0=D0=BC=D0=BC=D0=B8=D1=81=D1=82 <webautomator@gmail.com>

While figuring out necessary information about SQLXML, I found tha= t it is a JDBC 4 issue, according to SQL 2003(?) standard specification. I = found following databases containing SQLXML implementation:

=C2=A0

SQL Server 2008

HyperSQL

PostgreSQL

=C2=A0

Other databases have XML support in SQL syntax, for example H2 dat= abase, but I haven't found anything about SQLXML in their JDBC API

=C2=A0

So I digged a bit in HyperSQL API Javadoc, and here is what I'= ve found in org.hsqldb.jdbc.JDBCSQLXML.html:

=C2=A0

=C2=A0

=E2=80=9C<= b>HSQLDB-Specific Information:

=C2=A0

Starting with HSQLDB 1.9.0, a rudimentary client-side SQLXML inter= face implementation (this class) is supported for local use when the produc= t is built and run under JDK 1.6+ and the SQLXML instance is constructed as= the result of calling=C2=A0JDBCConnection.createSQLXML()<= /font>.

=C2=A0

SQLXML instances retrieved in such a fashion are initially write-o= nly, with the lifecycle of read and write availability constrained in accor= dance with the documentation of the interface methods.

=C2=A0

When build and run under JDK 1.6+, it is also possible to retrieve= read-only SQLXML instances from=C2=A0JDBCResultSet.getSQL= XML(...), given that the underlying data can be converted to an XML Do= cument Object Model (DOM).

=C2=A0

However, at the time of this writing (2007-06-12) it is not yet poss= ible to store SQLXML objects directly into an HSQLDB database or to use the= m directly for HSQLDB statement parameterization purposes. This is because = the SQLXML data type is not yet natively supported by the HSQLDB engine. In= stead, a JDBCSQLXML instance must first be read as a string, binary input s= tream, character input stream and so on, which can then be used for such pu= rposes.

=C2=A0

Here is the current read/write availability lifecycle for JDBCSQLX= ML:

=C2=A0

.=E2=80=9D

=C2=A0

My conclusions:

  1. Hence a difference in class purpose, betw= een JDBCConnection & JDBCResultSet

=E2=97= =A6=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0JDBCConnection is obviously dictates dat= a exange mode. Looks similar to global XML mode in MySQL, stating from vers= ion 5

=E2=97= =A6=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0JDBCResultSet implies that some general = SQL request is performed already. An that is=C2=A0exactly what I was seek= ing=C2=A0for:

=C2=A0

So I continued my lookup and found this in HyperSQL source code:

=C2=A0[...]

=C2=A0
=C2=A0
John,
=C2=A0
I am not a lawyer, but I frown on the copying without license notice o= f exact source code. I frown on copying the source code altogether.
=C2=A0
Please be more careful. I know=C2=A0HyperSQL is also=C2=A0open source,= =C2=A0but I rely on our derby community being very circumspect about what l= icense we use and accept. The HyperSQL license is *not*=C2=A0the=C2=A0apach= e license, and I do not even want to see their source code.
When you're doing further work on this, please be sure not to copy= this code.
=C2=A0
Thank you.
Myrna van Lunteren
=C2=A0
--0016362842fa2f50ff04837fed16--

Origin

Initially

After 1st Write

After 1st Read

After 1st Free

org.hsqldb.jdbc.JDBCConnection.createSQLXML()

Write-only

Read-only

Not readable or writable

Not readable or writable

org.hsqldb.jdbc.JDBCResultSet.getSQLXML(...)=

Read-only

N/A

Not readable or writable

Not readable or writable