Hi, Each document has a name, which is a URI. It is just a name, there is no hierarchical structure behind the URIs. But if you look at the URI like a path on the filesystem, you can recreate something like a hierarchy of directories:
- /root/dir/subdir/document.xml Even though this is just, as a whole, the name of the document. This also means that the directory a document is part f is function of its name, and it cannot be changed. Collections, on the other hand, are named set of documents. The name of the collection itself is a URI, and its value is a set of documents. Regardless of the document names. So the collection `/my/important/stuff` can contain the following documents: - /1/2/3.xml - some/important/stuff.xml - urn:example:another:one.xml One given document can be part of several collections. So they are the right tool to organize documents in logical groups. You can think of collections as tags on documents. So to say it in even fewer words: - directories are the way you organize "physically" your (unique) document names - collections are the way you organize your documents logically Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/ On 26 August 2016 at 12:45, Sachin Sharma wrote: > Hi Team , > > I wish to know the differences in the working of collections and > directories in MarkLogic.I have already gone through the documentation but > still the difference is not clear. Any help is appreciated with the help of > example > > Regards > Sachin Sharma > > _______________________________________________ > General mailing list > General@developer.marklogic.com > Manage your subscription at: > http://developer.marklogic.com/mailman/listinfo/general > >
_______________________________________________ General mailing list General@developer.marklogic.com Manage your subscription at: http://developer.marklogic.com/mailman/listinfo/general