You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2010/08/04 18:43:22 UTC

[Couchdb Wiki] Update of "GaganSaksena" by GaganSaksena

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "GaganSaksena" page has been changed by GaganSaksena.
http://wiki.apache.org/couchdb/GaganSaksena

--------------------------------------------------

New page:
#format wiki
#language en
== Gagan Saksena ==
Some recipes/notes from using CouchDB. These could be valuable someday for others navigating their way in these waters. For now mostly a placeholder for things I'm learning. This is '''work in progress'''!

==== Handy shortcuts ====
There are a number of handy shortcuts for doing standard reduce tasks- Checkout [[Built-In_Reduce_Functions]] for more details.

=== SQL Recipes in Map/Reduce ===
A collection of handy recipes to do common tasks in map/reduce. This page is still in development- checkout this book's page for some useful details- [[http://books.couchdb.org/relax/reference/views-for-sql-jockeys|Views for SQL jockeys]]

For the purpose of these recipes- the equivalent SQL table looks like this-

{{{
CREATE TABLE Foo //todo
}}}
||<tablewidth="80%">SQL||Map||Reduce||Notes||

||<tablewidth="80%">SELECT COUNT(*) FROM Foo;||function (doc) {  // todo } ||_count|| ||
||SELECT COUNT(*) FROM Foo WHERE Foo.bar ="value";||function (doc) {  //todo } ||_count||Fetch view with ?key=bar||
||SELECT DISTINCT bar FROM Foo;||function (doc) {  // todo } || || ||
||GROUP BY example||function (doc) {  // todo } || || ||
||GROUP BY with SORT BY example||function (doc) {  // todo } || || ||




----
CategoryHomepage