Hi all,

My colleagues and I are looking for a recommendation of how best to store what 
can be considered semi-static lists in MarkLogic.  These are the kind of lists 
that would be used to populate the dropdown lists on the front end web site.  
For example, a list of countries, languages, and also in our case a fixed list 
of crops, all of which can be used to associate as tags for a document when it 
is uploaded.  Is there a standard, accepted way to do this in MarkLogic or 
generally in XML data modelling?  When a user uploads a new document any 
associated tags will then be stored in that document.

The options we've considered are:

1.  We have one document which contains lists of the type:
<myns:countries>
<myns:country>Afghanistan</myns:country>
<myns:country>Aland Islands</myns:country>
<myns:country>Albania</myns:country>
<etc>

<myns:languages>
        <myns:language>Arabic</myns:language>
        <myns:language>Bambara</myns:language>
        <myns:language>Bariba</myns:language>
<etc>

<myns:crops>
        <myns:crop>Apple</Myns:crop>
        <myns:crop>Banana</Myns:crop>
        <myns:crop>Cocoa</Myns:crop>

2. Similar to above, but each type is stored in its own document

3.  Each individual item is stored in its own document, and a collection is 
added to help with filtering the relevant document, so we have a collection 
"CountryList" and a collection "LanguageList" or similar.  This seems to fit 
best with the recommendation of "one document is one record" when we try to 
convert our relational database thinking into document style, but makes lots of 
very small document fragments.  This also gives each value a related URI.

The lists may be updated occasionally, but not on a frequent basis.

We'd find it very useful to hear anyone else's experience and recommendations.

Many thanks,
Anne

* Think Green - don't print this email unless you really need to

************************************************************************
The information contained in this e-mail and any files transmitted with it is 
confidential and is for the exclusive use of the intended recipient. If you are 
not the intended recipient please note that any distribution, copying or use of 
this communication or the information in it is prohibited.

Whilst CAB International trading as CABI takes steps to prevent the 
transmission of viruses via e-mail, we cannot guarantee that any e-mail or 
attachment is free from computer viruses and you are strongly advised to 
undertake your own anti-virus precautions.

If you have received this communication in error, please notify us by e-mail at 
[email protected] or by telephone on +44 (0)1491 832111 and then delete the e-mail 
and any copies of it.

CABI is an International Organization recognised by the UK Government under 
Statutory Instrument 1982 No. 1071...

**************************************************************************
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to