incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nils Breunese <N.Breun...@vpro.nl>
Subject RE: Need to "subquery" in a view?
Date Mon, 28 Jun 2010 16:41:05 GMT
I haven't read up on the details of the problem in this thread, but just wanted to throw out
that sometimes a relational model is better than a non-relational one (*ducks*). CouchDB is
not a tool that solves all problems better than anything else and sometimes a relational database
just makes sense. Having said that, I a *lot* can be solved by CouchDB and thinking map/reduce,
which might take a while to get when you come from a relational mindset.

Ok, I'll let you all get back to actually solving Sean's problem. I just dropped in for some
general words of wisdom.

Nils.
________________________________________
Van: Sean Coates [sean@seancoates.com]
Verzonden: maandag 28 juni 2010 18:14
Aan: user@couchdb.apache.org
Onderwerp: Re: Need to "subquery" in a view?

> Sounds to me like you'll need to do this two queries.
>
> First, get the user doc, so you can get the IDs of the users he
> follows. Second, assuming you have a view of assets by user ID, POST
> to the view with all those IDs as the keys.

Yeah. I'm doing this now (on the app side), but it really breaks things like limits (I have
no idea how many user records I'm supposed to fetch in order to select (e.g.) 10 asset records).

Again, maybe I'm thinking of this too relationally, but I don't know how to rearchitect so
it's not as "relational."

S


De informatie vervat in deze  e-mail en meegezonden bijlagen is uitsluitend bedoeld voor gebruik
door de geadresseerde en kan vertrouwelijke informatie bevatten. Openbaarmaking, vermenigvuldiging,
verspreiding en/of verstrekking van deze informatie aan derden is voorbehouden aan geadresseerde.
De VPRO staat niet in voor de juiste en volledige overbrenging van de inhoud van een verzonden
e-mail, noch voor tijdige ontvangst daarvan.

Mime
View raw message