ai-diagrams · Diagram examples · Sample fintechStatement database · V1
■ Comparison table
Customer statement database: Aurora PostgreSQL, DynamoDB and DocumentDB
Three options for storing statement entries: 2.5 million new entries per day, 1.1 billion retained and a peak of 3,000 reads per second. 95% of reads request the last 90 days of an account, paginated by date.
Criteria
| Criterion | Aurora PostgreSQL | DynamoDB | DocumentDB |
| Data model | entries table indexed by account and date | account partition key, date and entry ID sort key | one document per entry, compound index on account and date |
| Access pattern | index range scan; filtering by type uses a partial index | paginated Query on the partition; filtering by type needs a GSI | find with compound index; type filtering uses the same index |
| Volume and growth | monthly partitions and cleanup by partition | no practical table limit; TTL for the 5-year retention | storage grows automatically; cleanup by job or TTL index |
| Consistency | writer reads are immediate; replica lag below 100 ms | strongly consistent read on request, at twice the read cost | primary reads are immediate; replica with short lag |
| Base cost | instance-hours even without traffic; Serverless v2 has an ACU floor | zero without traffic on-demand; pay per read and write | instance-hours even without traffic |
| Operations | vacuum, partitions, engine version; already familiar to the team | almost none; modeling by access pattern is new to the team | instances and indexes; no engineer has MongoDB experience |
| Choice | DynamoDB, because the main access is a Query by account and date, and entries never change after being written. Revisit if type filtering exceeds 20% of reads or cross-account queries are needed. |
Cost is shown as a billing model, not an amount: calculate the figure using the measured volume of 2.5 million entries per day.