Lars Martin wrote: > Hmm, I don't fully understand this. :-/ I see the lot of work to be > done to map from hierarchical structure to flat relational tables and > back. Ok, so far. But where is the difference (not functionally but > basically) between getCollection() and createCollection()? You have > to generate the "same" mapping algorithm. You just write CREATE TABLE > instead of SELECT FROM in your mapping code. Ok, this is written a > little bit too credulously but only because I don't see the difference > you want to point out ...
Retrieving a pre-existing Collection doesn't make any assumptions about how the Collection is stored, just as SELECT * FROM SOME_RESOURCE doesn't make any assumptions as to whether SOME_RESOURCE is a TABLE or a VIEW based on the join results of many TABLES. But you can't create a VIEW that in turn produces DDL to create several dependent TABLES. Mapping relational to XML can get very hairy. You can either take the Ari Krupnikov approach and say "Screw Mapping from a pre-existing set of tables, and just use the tables that I'm creating to persist a DOM", you can just treat a TABLE as a single-level Document source, or you can map one to many normalized tables into a single logical XML hierarchy. All of those can be exposed by a driver as a Collection, but actually creating one of those Collection scenarios is a bit more complex than just calling createCollection. -- Tom Bradford --- The dbXML Project --- http://www.dbxml.org/ We store your XML data a hell of a lot better than /dev/null ---------------------------------------------------------------------- Post a message: mailto:[EMAIL PROTECTED] Unsubscribe: mailto:[EMAIL PROTECTED] Contact adminstrator: mailto:[EMAIL PROTECTED] Read archived messages: http://archive.xmldb.org/ ----------------------------------------------------------------------