couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kenneth Tyler <...@8thfold.com>
Subject Re: couchdb for aggregating data
Date Fri, 13 Aug 2010 13:30:39 GMT
Dan,
I assume that what each person eats does not change after the record is created.
Say you had documents that were recipes, which had lists of nutrients.
Then a meal document would have a list of recipes, but it would also
have the totals for all the nutrients in all the recipies.
A persons day document would combine the information about the person
and names of the meals they received and totals for the nutrients.
This is a calculate as you go strategy... that trades off data storage
space for complexity.
It makes the set of person-day documents more like something you'd
find in a datawarehousing setup

ken tyler
On Thu, Aug 12, 2010 at 9:12 PM,  <whimsica@aol.com> wrote:
> I just wanted opinions on a site I'm building that converts meals into overall nutrition
statistics.
> Currently it's in mysql and php.
>
> It tracks what people eat and breaks it down into nutrients as follows.
> Each meal is composed of recipes which are composed of foods -- like a burger is beef,
pickles, bun, catsup, mayo, etc.
> Each food has 150 nutrients associated with it.
> So for each person's day it's got to go ,meals-recipes-foods-nutrients then output a
total of each of 150 nutrients in the USDA database.
>
> Right now we are running into major problems querying the data for more than 200 days.
The mysql query is almost unreadable.
>
> Would couchdb offer advantages for this sort of database problem?
>
> Thanks for any opinions.
>
> Dan
>
>
>
>
>
>
>
>

Mime
View raw message