Re: [bdbxml] I want to store binary content in my DBXML

"Mark R. Diggory" <mdiggory-Mahy8Y1M33PaZwrp7/[email protected]> Sun, 11 Sep 2005 16:50:56 -0400
Newsgroups gmane.comp.db.dbxml.general
Message-ID <[email protected]>
The trick is that I'm trying to use BDBXML as my file format for my
application and I want to use the BDBXML/BDB API's to access it all. I
want to be able to transport the whole contents of my applications
"Document" as one file without any heavy duty repackaging efforts on my
part, I want to promote the BDBXML API as the API for Application
developers to use when accessing my files (instead of authoring my own API).

This is why it'd be advantageous to store them in the DB along with the
XML. From a storage standpoint, I could tolerate them being in something
like Base64 because theres lots of standard Base64 conversion libraries
to get them back out in various languages. I just think that it might be
better if I went down to the level of Berkeley DB as opposed to being
Base64 text in a BDBXML document since Base64 increases the storage
requirements by a ratio of 4:3, it'd be better to be able to store the
bytes in their native encoding (or even compressed) to save space.

This is a library application and there are allot of XML formats that
like to include the ability to hold binary Base64 encoded content as
values. But mostly they are just for transport, not storage.

Does this make any sense?

thanks for your advice,
Mark

Steve Howe wrote:
> Hello Mark,
> 
> Sunday, September 11, 2005, 5:06:42 PM, you wrote:
> 
> 
>>Folks,
> 
> 
>>I know its sounds crazy at first, But I want to store non-XML content in
>>my BDBXML instance. Is there any best practice in this reguard? I know 
>>that XMLDB API promotes the concept that resource can be XML or Binary, 
>>this means that its stored in the DB and can be retrieved as a Stream. 
>>Any Ideas on a strategy for this in BDBXML? I suppost one could Base64 
>>encode it into an XML Document, but I'm concerned this will slow the 
>>rest of the db's performance down, Id like to store it in the underlying
>>BDB instance somehow. Any tips or ideas would be helpfull!
> 
> In this case... why don't you just store the data in a regular Berkeley
> DB database ?
> 
> If you need to store both XML and binary data, my advice is: store XML
> data in BDBXML and binary data in regular BDB, and in the XML, store the
> links for the BDB data. You'll have the best of both worlds.
> 



------------------------------------------
To remove yourself from this list, send an
email to [email protected]