couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kenneth Tyler <>
Subject Re: an aggregate object
Date Mon, 12 Apr 2010 21:48:25 GMT
I was trying to keep the description of my problem simple.... i
actually need to be able to have some of the documents in my group of
documents themselves be groups of documents.

so in this case the video clip might end up being 3 video clips that
are variations of each other

i need to both be able to group the text doc, the image and the 3
video clips together... i also need to be able to tell that the 3
video clips "belong" to each other

a multipart name that can be recursively processed will let me do
that, but i think i'd lose a "document_group" value the minute i had a
group that was itself a group



On Mon, Apr 12, 2010 at 2:09 PM, Jeremy Wall <> wrote:
> What you describe would work but since this is couchdb and it allows
> freeform documents of any form you want you may want to consider just having
> a
> document_group field in the document that holds the id instead of using a
> field prefix. It would make querying the views easier for you.
> On Mon, Apr 12, 2010 at 3:59 PM, Kenneth Tyler <> wrote:
>> this may sound a little strange
>> i am trying to build up a "content" object that can contain several
>> kinds of files.
>> for example, it might contain a some text, and an image, and a video clip
>> i want to tag my documents in couch so that i can retrieve the whole
>> "family" of documents
>> so i use a field called "name" and i put the uuid generated for the
>> first document in the family into that field in all the documents i
>> want to belong to the content "family".... i add that documents own
>> uuid as the second part of the "name": 89ehjwol8e7/7896w89e6r
>> i this case we would have documents T I AND V, and they would all have
>> "names" with the same uuid at the beginning of the string
>> so i can make a view with the "name" fields as the key and get back
>> all three documents by using a regular expression that looks for the
>> common head of the string in all the name fields
>> .....
>> it gets more complicated later... but first i wanted to check and see
>> if this approach "fits" with the way couchdb "wants" things to be done
>> i love couch... i really think its going to be huge.... i'm coming
>> from a ms access application developer background... so a lot of stuff
>> is strange at first... and i have a lot of "relational" habits about
>> how i think about data
>> thanks
>> ken tyler

View raw message