Hi Luca,
If I create several collections in a database using the CREATE COLLECTION
> command, how are they organized? Is there still a root collection or are
> they all at the same level?
>
No, there is no 'root' collection. Also, Sedna doesn't supports nested
collections. AFAIK, XML:DB is the only API which *emulates* nested
collections.
> Would the following procedure be correct?
> - Create a root collection (let's say Main) with CREATE COLLECTION Main
> - Create child collections inside that collection, using the xmldb function
> CollectionManagementService.createChildCollection(...)
> - use DatabaseManager.getCollection(...) to get the root collection and
> then use something like myMainCollection.getChildCollection() in a loop
>
Sounds ok. Just try it and let us know if there are any problems ). You can
also get 'real' state of the collections/documents if you run "
doc('$documents')" query (say via se_term).
On a side note, let's say I have a Java project using Sedna, which I want to
> give to some people for testing : they'll use their own instance of Sedna,
> thus they'll need the same collections. Would it be better to have a Java
> method checking the collections and creating them if need be, or can I write
> some sort of script (like, say, in MySQL) to create the collections after
> setting up the database?
>
Script should be much easier, I think. Besides there is the export/import
tool which creates such script for you:
http://modis.ispras.ru/sedna/adminguide/AdminGuidesu5.html#x9-170002.5.1 .
Ivan Shcheklein,
Sedna Team
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion