What you guys' think is the best type of database ( Mysql,postgresql,mongodb... ) And provider ( aws, azure, supabase... ) for a Saas?
For further actions, you may consider blocking this person and/or reporting abuse
What you guys' think is the best type of database ( Mysql,postgresql,mongodb... ) And provider ( aws, azure, supabase... ) for a Saas?
For further actions, you may consider blocking this person and/or reporting abuse
M1dnightGMR -
Nikhil Soman Sahu -
T Sudhish Nair -
Aniello Musella -
Top comments (15)
I am not a software architect, but in my opinion, there is no best kind of database. It depends of what you need to do.
If you have a strict schema, relations between entities and not a huge volume of data, relational databases may be a good choice. (I like PostgreSQL for that.)
If you don't have a strict schema or have a huge amount of data or traffic, databases like MongoDB might be a better fit.
And it also depends on what you need for the choice of the provider. Sometimes a self-hosted database is also a good choice.
I'm going to build a tool to automate social media posts, so i will need to save a lot of data regarding the posts of each user for each social they have connected to their account. Besides that i will need to have on my server a code that will call my database each minute and check if it should post something at that time ( since they are scheduled per request of the user )
To me this doesn't sound like highly relational data. I think a nosql document database would be fine. But the main question is where do you host or do you have a service provider? Because then the best is to use something your provider already has.
If AWS I would say use Dynamo DB.
If Google then I'd use firebase's document database.
If something like heroku, I'd use their mongoDB plugin.etc
A standard relational database will handle this perfectly fine. Postgres is versatile and will handle the use case.
For node.js I devekoped trdb. it is a db in a single json file. I estimate it is good for the first 10000 records.
Then the api is designed in a way, that it can be easily replaced with mongo or sql databases, without to much code changes.
I developed it after using json-server for a few personal projects. because: while json server is good for prototyping frontend applications and with trdb I wanted to target backend developers backend, to get prohects started quickly and be sure, that the applucations can change to real databases once needed.
trdb, similar as json-server want you get started with your projects, because I believe, most projects fail, because they never got started.
It depends on your SaaS needs.
To put it straightforward, Relational databases are efficient at processing queries and joining data across tables, making it easier to perform complex queries against structured data, including ad hoc requests. Non-Relational databases lack consistency across products and typically require more work to query data, particular as query complexity increases.
Relational databases
Offer many important features that make them aptly suited to enterprise workloads, which is why organizations have been turning to them for so long. They’re optimized for handling highly structured data, and their inherent characteristics -such as normalization, atomicity, and consistency- ensure the integrity of that data throughout its lifespan. These features also contribute to better storage utilization, while providing flexible query support through standards-based SQL.
Non-relational databases
There are different types of non-relational DBs
If it was me I'd probably use PostgreSQL stored in a cheap VPS to begin with.
If you need to scale the DB there's always options to scale your VPS instance resources (vCores, RAM, disk space) and if needed, you can either distribute your DB through different VPSs or migrate to a cloud platform in a future.
what about pocketbase.
it is a headless cms and realtime database. Backed by golang and sqlite in single process mode, you can serve 10 000 concurrent users from any cheap 6$ vps. Once your app outgrow this db, you likely have the money and the knowledge what bigger scaling database will be the best choice.
If you want a database with wide capabilities go for postgresql. It has many features and flexibility of NoSQL world.
Provider aurora, serverless db with support in many engines. What I like of aurora is the ability to scale up/down transparently.
If you need relational data, MySQL and Postgres are the best bet. From a developer standpoint, here is a comparison between postgres vs mysql .
If its NoSQL and you can self manage instances,
MongoDB is definitely a good option. AWS even offers managed Mongodb.
Regarding AWS, Azure it highly depends on your tech stack and cost you currently have.
I'm so bored with that kind of question...
You should absolutely know that every type of database has its own scope of use. There is no "best" type of database.
It depends on several criteria that you do not expose on you topic :
Oracle
unless you want security. 🤣
We use main database MongoDB side database postgresql and mysql. Project deployed on the aws. We are heybooster! 😍