One of the most asked question for system design is - "Which storage mechanism/database you will pick for the problem?"
If you are going to answer that I know X database. Hence, I would like to go with X, it would be a WRONG answer.
Neither you should be talking in terms of any database brand/name. Infact the correct way is to talk about the type of the database. Eg: Relational, document, graph etc.
Now, the question comes how one can pick the database. So, here is a short summary which can help you to take decision:
Schema | Schemaless or strict Schema |
---|---|
Type | What type of problem are we solving and what type of database is it? |
Transaction | Is transaction integrity required or not? |
Performance | How is the performance of the DB for Read and Write operations |
Scalability | Is the database scalable and what would be the cost of it? Eg: Mongo, MySQL or Postgres supports scalability by DB partitioning and sharding |
Opensource | Is the database open-source vendor locked? MySQL is OS, and Aurora, or DynamoDB are vendor locked (AWS) |
USP | What is the unique feature of the database? Eg: Document-based DBs are easier to scale due to sharding, and Aurora is highly performant. |
How you talk to DB | Which programming language a database is using. Eg: Relation MySQL uses SQL. |
Top comments (2)
Aways an interesting topic! This article might also be useful in expanding upon the points you made: Database Architectures & Use Cases
Thank you Margo for your kind words. Loved the blog you have shared (I just give it a quick read) and saved it for for later read.