[MonetDB-users] (no subject)

Matt Magoffin monetdb at msqr.us
Thu Oct 4 00:21:53 CEST 2007

Hello Fabian,

Thanks for your reply. I have some further questions below.

> Hi Matt,
> On 03-10-2007 09:14:46 +1300, Matt Magoffin wrote:
> ...
>> I'd like to implement a MonetDB version of this API now, but I am having
>> some difficulty finding out how to effectively access MonetDB through
>> Java. So far I was able to use the MonetDB JDBC driver to construct
>> XQuery
>> statements and get XML results, and also I was able to construct MonetDB
>> pf:add-doc() statements to add documents, but I am wondering if this is
>> the best approach (and if so, how to add documents to a remote MonetDB
>> server using the pf:add-doc() mechanism).
> The only possibility to add a document "over the wire" is by a hack in
> JDBC that is really very limited.  The name of the document that you
> will store is autogenerated and returned in a warning on the Connection.
> Unfortunately there is no better support in MonetDB/XQuery to add
> documents.

I see. Xaj comes with a remote server implementation already, so I could
use this to transfer the XML to the MonetDB server, and from there file://
URIs will work for storing documents, so I can work around that issue
(this is how we support Berkeley DB XML running on a remote server).


>> The API I am trying to implement you can view here, to give you an idea
>> what I'm trying to do:
>> http://xaj.svn.sourceforge.net/viewvc/xaj/xaj/src/net/sf/xaj/XmlDb.java?revision=2&view=markup
>> It was somewhat modeled after the defunct XML:DB API, but focused just
>> on
>> add/store/XQuery operations. Any help/advise would be greatly
>> appreciated!
> I'm affraid we can't do any batching at the moment, neither can you
> rename documents such that you can assign an ID to them, as far as I
> know.

In terms of batching, I think all I would need is transaction support.
Does MonetDB provide JDBC transaction support, and do the transactions
cover the XQuery functions like pf:add-doc()? That is, can I start a JDBC
transaction, call a bunch of update statements using pf:add-doc(), and
then commit or rollback that transaction?

-- m@

More information about the users-list mailing list