On Sun, 21 Dec 2003, Eli Marmor wrote:
> Hi,
>
> Does anybody there have any experience and/or knowledge about how to
> implement a hierarchical XML *database*?
>
Implement - no, but I can give it some thought.
> Should I store the information in pure XML format and retrieve it using
> XPath (and maybe even manipulate it using XSLT)?
>
You mean that all the information for the collection will be in one file?
In this case you'll have O(n) lookup and modification (where n is the
length of the file). This is usually unacceptable.
> Or, alternatively, store it in binary database?
>
If you want efficient lookups then this is probably a better way.
> And if the latter is the true one, should I do it in an XML-dedicated
> database (such as Apache Xindiceor dbXML), or an XML layer over a
> standard database (such as PostgreSQL/MySQL)?
>
Well, I once saw an Internet ad for an XML database (a commercial one),
accessed its page and there saw that trying to store XML in a traditional
relational database is not effective. XML out of its free form nature
would be hard to translate to the relational model, unless perhaps you
restrict yourself to a certain format, and write a dedicated conversion
script.
I never had any experience with XML databases, so I can't tell how
suitable they would be for what you need.
> And which solution specifically? Is there a more recommended package
> for this purpose?
>
Sorry, never had any experience with any XML database.
>
> My exact need, if it is required to help you to answer me:
> to retrieve XML views ("view" has a special meaning in data retrieval
> from databases), so after the retrieve action I'll have a partial XML
> tree. Of course, it doesn't force me to use XML for the main storage
> too, so this point was asked too.
>
Do you expect the partial XML tree to be as large as the original XML tree
up to a factor. (View = a*Original)? If so, then storing it in a database
will not increase your time complexity from O(n), but may make it faster
due to optimizations. If this is not the case, then I suggest you look at
custom solutions.
Note that given a suitable description of XML, you can map it into a
Perl-like nested data-structure, which can generate the view for you. It
will take some work, but may be worth it. XML databases may give you such
things (almost) for free.
Regards,
Shlomi Fish
----------------------------------------------------------------------
Shlomi Fish [EMAIL PROTECTED]
Home Page: http://t2.technion.ac.il/~shlomif/
Writing a BitKeeper replacement is probably easier at this point than getting
its license changed.
Matt Mackall on OFTC.net #offtopic.
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]