Database Selection¶
The selection of an appropriate database depends on various factors, including the type of data to be stored and the expected query patterns. Different types of data, such as metrics data, logs, enterprise data, graph data, and key/value stores, have distinct characteristics and requirements that demand tailored database solutions.
Relational databases¶
Relational databases are also called a relational database management system (RDBMS) or SQL database.
For enterprise data that requires strict ACID (Atomicity, Consistency, Isolation, Durability) transactions and complex relational querying, a traditional SQL database like PostgreSQL or MySQL might be the right choice. One can perform join operations using SQL across different database tables.
Non-Relational databases¶
Non-Relational databases are also called NoSQL databases.
These databases are grouped into four categories
- key-value stores
- graph stores
- column stores
- document stores
Join operations are generally not supported in non-relational databases.
Usecases¶
- For metrics data, where high write-throughput is essential to record time-series data, a time-series database may be more suitable due to their optimized storage and querying mechanisms.
- For handling large volumes of unstructured data, such as logs, a NoSQL database like Elasticsearch or could provide efficient indexing and searching capabilities.
- For scenarios demanding simple read and write operations, a key/value store such as Redis or Cassandra could offer low-latency data access.