couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svilen ...@svilendobrev.com>
Subject Re: Tree like structures in CouchDB
Date Fri, 22 Feb 2013 04:27:27 GMT
my rough guess:

if it's finite depth, then all in one doc:
- list of (item or (list of ...))
- or same with dicts

else, one doc per message keeping just link-to-parent, 
or multiple links-to-grand...grand-parents and/or root.
similar to the strategies in SQL - nested etc.
keeping all chidlren of same node in one doc is also possible..

in any case either traversal or storing or both will be
difficult. 

ciao
svil

On Fri, 22 Feb 2013 17:13:01 +1300
Michael Heuberger <michael.heuberger@binarykitchen.com> wrote:

> Hello guys
> 
> I'd like to store messages in a tree like structure. Whenever you
> reply to a message, then the original message becomes the parent
> message.
> 
> How would you implement something like this in CouchDB? Just curious
> and need a little guidance + advice here.
> 
> Thanks,
> Michael
> 
> -- 
> 
> Binary Kitchen
> Michael Heuberger
> 4c Dunbar Road
> Mt Eden
> Auckland 1024
> (New Zealand)
> 
> Mobile (text only) ...  +64 21 261 89 81
> Email ................  michael@binarykitchen.com
> Website ..............  http://www.binarykitchen.com
> 

Mime
View raw message