问题
Some developers who have a good knowledge of querying SQL databases struggle to implement the equivalent query patterns in Cloudant/CouchDB.
How can these developers translate their SQL knowledge to Cloudant/CouchDB?
回答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
来源:https://stackoverflow.com/questions/28339910/how-can-i-use-my-sql-knowledge-with-cloudant-couchdb