Hi Thomas,

Indeed, we use the "one database for one model" approach.
Since Couchdb doesn't have hardcoded relations, I'd share your
conclusion that it's not easy to have it automaticlay handled with a
relationnal oriented ORM.
Then, you could still have several models with the same database
(cakePHP table here), but each one using a specific view (where the
"type" filtering is done).


To be honest, there are only few parts of our website (http://
pathmotion.com) which use CouchDB.
Our philosphy is to still use SQL databases where there are relations
between models, and to duplicate some datas into CouchDB in order to
benefits the power of the indexes you told about.
They are mainly used for pre-calculation, aggregation, statistics. On
some intense algorithm, the gain was about 80 times faster !

Regards
--
Clément




On 13 juil, 11:33, Thomas Ploch <[email protected]> wrote:
> Hi,
>
> I am currently doing the same for my company as well.
> You are going to face a bit of trouble here, since I can't see how you
> model your couchdb views to fetch relations. See an introduction on
> Entity Relations with couchdb views 
> here:http://wiki.apache.org/couchdb/EntityRelationship
>
> As an addition, the approach with multiple databases (one for each
> model) seems flawed, since what about bigger projects needing
> master/slave replication logic. For a bigger amount of Models, this will
> not be manageable.
>
> I don't think the CouchDB view approach can be achieved without a
> special CouchDB Model overriding save(), find(), etc. Since the approach
> differs extremely to the approach the CakePHP Model class is handling
> the relations.
>
> Although I think that this is a good start to implement the CouchDB view
> API (the BTree indexes are awfully fast :)), I think there is still a
> lot to do to make it what I would call a "production ready" DataSource.
>
> Best regards
> Thomas
>
> Am Mittwoch, den 13.07.2011, 02:10 -0700 schrieb Clément Hallet:> Hello to 
> cakePHP
>
> > I created a CouhDB datasource at my company, and we released it as
> > open source.
> > It handles CRUD methods on a document, and can query the CouchDB
> > views.
>
> > Code and documentation are available here 
> > :https://github.com/PathMotion/cakephp-couchsource
>
> > If you're interested in review, comment or bug-report it, please feel
> > free.
>
> > --
> > Clément

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to