How can I use my sql knowledge with Cloudant/CouchDB?

Solution 1:

This community wiki page provides links to some SQL patterns showing how they may be implemented in Cloudant.

As this is a community wiki feel free to add new Q&A links here.

General database queries

  • Joining two documents by key?
  • How do I do the SQL equivalent of “DISTINCT” in CouchDB?
  • How do I do a triple join in CouchDB?
  • Inner joining by document field?
  • How do I do subqueries?
  • How to do a one-to-many join?
  • How to do many-to-many joins?
  • multiple WHERE and OR clauses
  • WHERE ... IN query
  • WHERE ... NOT IN query
  • Performing queries across databases
  • Can I do transactions and locks in CouchDB?
  • Cloudant SQL Join cookbook

  • Add your new Q&A links here ...

Aggregate database queries

  • COUNT(*) aggregate function?
  • SUM * GROUP BY queries?

  • Add your new Q&A links here ...

Full text queries (lucene) - Cloudant only

  • Add your new Q&A links here ...

See also

  • View cookbook for SQL jockeys