How to choose a database
Database types
Relational Database
from chatgpt
PostgreSQL
Strengths:
transactions, joins, constraints, flexible queries
Weaknesses:
horizontal scale/sharding complexity, not ideal for huge analytical scans
DynamoDB
Strengths:
massive scale, predictable low-latency key access, operational simplicity
Weaknesses:
access-pattern-driven modelling, limited relational querying
Columnar
Strengths:
analytical scans, aggregations, compression
Weaknesses:
poor fit for transactional workloads
Graph
Strengths:
relationship/traversal-heavy queries
Weaknesses:
specialised, unnecessary if relationships aren't the primary query pattern
Write heavy
In traditional database system with 1 master, it is difficult to scale writes.
A single postgres can manage well 5-10k write per second.
You can add more masters to distribute writes, but that's difficult to manage.
You can also use Database Sharding.
Flow charts
Specific versus
In this topic
- DocumentDB vs DynamoDBGrowing
Amazon DynamoDB and Amazon DocumentDB are both fully managed NoSQL databases on AWS, but they are built for entirely different data models and architectural needs. Choose DynamoDB if you need predictable, single-digit…