Ask HN: What database should I use, and how should I choose?
First off I am working on a web application and eventually a mobile application with the following requirements:
* I need something that will support offline storage at some point.
* There will be a lot of reading from the database
* There will be a lot of small writes to the database, but not many big writes
* I don't really want to lose data
* I would like to support real time interactions
* I would like it to be easily scalable and maintainable (possibly hosted/maintained by a third party) as I am working solo
I have experience with Mongodb (although possible loss of data is alarming) and a lot of experience with MySQL/Postgres.
I am looking into Couchdb/Pouchdb as that seems to fit my requirements, but I am concerned about speed.
17 comments
[ 2.4 ms ] story [ 60.9 ms ] threadI use MongoDB for our core database, but we also have data in elasticsearch for text based queries and some reporting. I am right now contemplating introducing Postgres for the accounting side of our SaaS and to possibly serve some of our reporting requirements that we have found are truly highly relational.
So I don't think in today's environment that you need to say one database is the end all. However, I agree that picking one is the right choice for a new project and then adding/changing as you find the requirements that don't fit. We are micro-serviced based too so in some ways it makes it easier because we isolate which services interact with which databases, but I won't say it isn't without its own complications too.
If your data is relational, that is what relational DBs are for - if you hdata is text search, that is what elastic search tools are for.
The key is to identify how the data will be used.
Good luck on the project.
If you are lucky enough to get to the point of having scalability problems, and vertical scaling won't cut it, pick something else.
I'd personally forget the database and instead look for a decent ORM. One you can develop against and then connect to different database solutions (e.g. offline and online databases). That way your choice (no matter how good or bad) can be changed later.
(I work on the MySQL team, happy to answer any questions)
https://blog.cloudboost.io/which-database-should-you-use-for...
The idea is as a developer - You don't really have to care about about "Which database you should actually store your data in?" and this is why we have machine learning service that actually learns how you store and how you query your data and figures out the database where your data should naturally belong.
As a developer, You only care about storing your data and getting your data back, and that's what we enable you to do.
Let me know if this helps, and feel free to reach out to nawaz@cloudboost.io if you need any more information / help.
s/CloudBost/CloudBoost/
Use PostgreSQL then, because experience is key. Also: more time to work on the hard stuff.
> I would like to support real time interactions
What do you mean by that?
> I would like it to be easily scalable and maintainable (possibly hosted/maintained by a third party) as I am working solo
Nothing is easy to scale (across a network) if you do not want to lose data safety. So either pay someone to maintain such a beast (costly) or maintain it yourself (time-consuming, error-prone unless you are experienced).
I know there are ways to scale across a network using PostgreSQL but I suggest thinking about the scaling problem when it actually occurs. Or has it already?