couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: RESTful document structure
Date Sat, 09 Jul 2011 19:35:11 GMT
REST does not require that you use only one type of document per
database. Even if it did, I'd strongly advise violating a rule as
silly as that.

Put whatever documents into your database as you please.

B.

On 9 July 2011 19:39, Johnny Weng Luu <johnny.weng.luu@gmail.com> wrote:
> Since CouchDB is implementing a RESTful API, doesn't that mean I wanna put
> all documents of the same type in their own database?
>
> eg.
>
> POST http://localhost/users
> GET http://localhost/users/1
> PUT http://localhost/users/1
> DELETE http://localhost/users/1
>
> POST http://localhost/threads
> GET http://localhost/threads/1
> PUT http://localhost/threads/1
> DELETE http://localhost/threads/1
>
> Rather than putting them all in one big database (http://localhost/my_app).
>
> Doesn't a 100% RESTful approach mean that the former is more correct?
>

Mime
View raw message