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

Add SQL Backend support #30

Open
adewes opened this issue Oct 14, 2014 · 1 comment
Open

Add SQL Backend support #30

adewes opened this issue Oct 14, 2014 · 1 comment

Comments

@adewes
Copy link
Owner

adewes commented Oct 14, 2014

Add support to store and retrieve documents from relational databases such as Postgres or MySQL.

How to do this:

  • The table layout will be such that the serialized JSON document gets stored in a BLOB field, and all indexes on values in that document will get stored in additional, indexable columns that have to be defined beforehand.
  • Querying is only possible using indexed fields.
  • When updating documents, indexed values will get updated automatically.
  • When specifying indexes, a type must be given (e.g. text, string, double, int, ...). When trying to store a document with an invalid index value, an exception will get raised.

This way of indexing and storing documents makes it possible, to perform advanced queries on them and even make use of SQL JOIN operators to enrich documents of a given collection with data from other collections, based on some index value in the document.

@dmytrokyrychuk
Copy link
Contributor

PostgreSQL has native JSON support. http://www.postgresql.org/docs/9.3/static/datatype-json.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants