I am building an app that I want to publish, I will write the app in Python. I don't want to lock down the use of any specific database sql/nosql to my app. How can I design the app or model layer to not enforce a SQL/NOSQL way to store the data.
Is there an ORM that plays with both type of storage? I didn't find one. Normally I would use sqlalchemy to make sure people can use MySQL/PostgreSQL/MSSQL/etc if they want, but adding the NOSQL to the picture seems more complicated than I initially thought.
I have some requirements like:
If you have any idea how I can architecture these requirements I would appreciate the help. Is it possible to create a structure like this:
+-----+
+ app +
+-----+
|
+-------------+
+ Data Access +
+-------------+
|
+-----------+
+ SQL/NOSQL +
+-----------+
Thanks
Data is automatically replicated between the two. The key to the NoSQL and SQL combination is the replication process, and that's where ORM comes into play. It provides an asynchronous, low-coding solution that updates the database from the NoSQL data store.
NoSQL is not supported by the ORM, but you can of course use NoSQL with other Django features, or alongside a relational database. What features are you looking for specifically? The data we receive from other applications are in purely JSON format. So that is the reason we wanted to include Nosql db (mongo db).
Using MongoDB removes the complex object-relational mapping (ORM) layer that translates objects in code to relational tables. MongoDB's flexible data model also means that your database schema can evolve with business requirements.
Using a NoSQL database doesn't mean you can't use SQL; SQL is just the query language. In fact, NoSQL and SQL can be complementary. Some NoSQL databases use SQL to search the data.
No there is nothing like that.
An ORM or a RDBMS can rely on SQL as minimal standard for abstracting the underlaying database. Most ORM are build on top of the Python DB API (which is implemented more or less complete by all RDBMS Python bindings).
For NoSQL there is neither a standard query language nor a standard driver API.
So there is nothing like that that works for both worlds.
There have been approaches for defining a common query language for NoSQL language.
For example there is JsonIQ
http://www.jsoniq.org/
But there is not much that help you in reality.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With