How to select the right database for the service?
It is a very crucial step when it comes to databases in designing systems. In order to get the right database for our data, we need to first look over 5 factors that are as follows:
- Structure of Data
- Pattern query
- Amount of scalability
- Cost
- Maturity of the database
When we to use relational and non-relational database in system?
When we are having structured data(tabular data) than using relational database is optimal because here the data is in form of rows and columns and can easily be stored. Popular examples: MySQL, oracle, postgres, SQL server.
But if we do not need ACID properties than it is upto us which one to choose as per the requirements.
Choosing a database is depicted in a flowchart below as follows:
Note: If we do not need ACID properties , nor do wide variety query types and neither our data is ever increasing than it directly implies it is a low scaled system with lesser number of attributes over small data set where we can opt for any of either datatypes.
Now let us compare via tabular format below as follows in order to choose the best database as per our system design so that we are clear.
Complete Reference to Databases in Designing Systems – Learn System Design
Previous Parts of this System Design Tutorial