Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support JOINs in Mango #1510

Open
wohali opened this issue Aug 7, 2018 · 4 comments
Open

Support JOINs in Mango #1510

wohali opened this issue Aug 7, 2018 · 4 comments

Comments

@wohali
Copy link
Member

wohali commented Aug 7, 2018

@davisp:

JOINs make me squeamish.

@janl:

I hear ya, but devs love em :) — And a native API would simplify a lot of app and library code.

I’d definitely say it shouldn’t be full SQL JOIN semantics, but a simple LEFT JOIN on a key over two views should be fine and address a good bunch of use-cases. Basically, anything that isn’t conceptually different from merging multiple shard-view results on the top node, just with two views.

@nolanlawson:

Relevant pouchdb-find discussion: https://github.com/nolanlawson/pouchdb-find/issues/157

@natcohen
Copy link

I think it will make CouchDB more appealing to "SQL-familiar" developers...

I remember reading a post from @janl (for the 2.0 release) about a potential SQL to Mango adapter in the future. Mango is probably far from this but adding JOINs would be a big step in this direction.

@wohali
Copy link
Member Author

wohali commented Oct 18, 2018

@natcohen FYI one way this can be achieved today is via the partial indexing feature. It's not perfect, but you might want to give it a look. Basically, make an index that represents the first part of the join, then use a selector on that partial index specifically to restrict the query further.

@natcohen
Copy link

@wohali Thanks for the workaround but like you said, it's not perfect and it's a "workaround". I think CouchDB will have to support more SQL functions to attract more developers. Storing data, which CouchDB does perfectly, is one thing but developers also need to retrieve it and frankly CouchDB is not very good at it. I really think CouchDB developers should focus on that in the following releases...but that's just my opinion!

Thanks for the hard work!

PS for the skeptics https://blog.timescale.com/why-sql-beating-nosql-what-this-means-for-future-of-data-time-series-database-348b777b847a and https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/46103.pdf

@wohali wohali moved this from Proposed for 3.x to Proposed (release independent) in Roadmap Jul 11, 2019
@jeremielodi
Copy link

jeremielodi commented May 7, 2022

Why not to incorporation features like https://github.com/AlaSQL/alasql for retrieving data?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Roadmap
  
Proposed (backlog)
Development

No branches or pull requests

3 participants