Forums

store some data in SQL or NoSQL

Suppose I need to store some data (Pandas df) for a user for a session (or across sessions). Some data will be temporary in that session and deleted afterwards. Some will be stored across sessions. Theoretically, would I prefer to do that in SQL or NoSQL (either one may be easy from Pandas)? How about practically on PythonAnywhere? I am somewhat inclined toward MongoDB but that could easily change. Adding new columns to the data is a frequent need, so NoSQL seems better. It would be nice to store JSON and XML directly, too. Do we have a newer version of PostGres on paid plans? It seems convenient to store, say, session ID in a relational way, but my JSON as-is. Also, maybe using dask (instead of pandas) is better and doesn't require any of the above questions to be answered (for a time).

Any guidance/considerations appreciated.

Our current Postgres version is 9.4, which I think supports JSON datatypes (though I haven't used them myself). Although you can't run MongoDB directly on PythonAnywhere, there are definitely people out there who are using mlab.com or other providers for their Mongo servers, and then connecting from inside PythonAnywhere -- that needs a paid plan, though.

Thanks a lot, Giles. Either of those sounds good. I'll do some testing locally. I like the direct-on-PythonAnywhere a little better, already, though.