cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sonney <ke...@webslingerZ.com>
Subject Re: Storing XML in databases w/o lots of string parsing....
Date Fri, 21 Apr 2000 16:04:12 GMT
On Fri, 21 Apr 2000, Mike Engelhart wrote:
> I have two simple classes (ObjectReader and ObjectWriter) that convert
> arbitrary objects to ByteArrayOutputStream and ByteArrayInputStream to pass
> onto a database using the standard JDBC call setBytes().

Yup. I've done something similar in a grander scale when writing a wrapper
to store whole XML documents into SQL databases. I'd keep a large doc in a
CLOB - allowing for "where XMLDOC like '%keyword%'" searches. No need to
parse docs until *AFTER* you've determined which ones contain the data
you need. You only parse to see if the data is in the right
Element/Attributes *grin*

Alas, all that code (and, technically, the knowledge on how to do it) is
wrapped up in an NDA, and I can't re-use any of my ideas on that. Yet. 
*grin* It expires in October.

> anyway, let me know if you interested and I'll forward the source.  You may
> need to tweak it a little bit to work with mySQL as I only tested it with
> PostgreSQL.

Nope, if it's standard JDBC, those calls work on MySQL, PostgresSQL, and
DB/2 out of the box. I figure it works almost anywhere, assuming the
driver supports it.

-- 
- Kevin Sonney
  kevin@webslingerZ.com


Mime
View raw message