Data Architecture

Data architecture covers how data is stored, accessed, and flows through a system. Database choice is one of the highest-impact architectural decisions.


What’s Here

Data Formats

  • bson — Binary JSON, MongoDB’s data format
  • base64-encoding — Encoding binary data as ASCII text
  • hashing — Hash functions for integrity, lookup, and cryptography
  • cdn — Content delivery networks and caching strategies

Databases


Database Selection

Use CaseDatabase TypeExamples
Financial transactionsRelational (ACID)PostgreSQL, MySQL
Flexible schemaDocumentMongoDB, CouchDB
High-volume time seriesTime-seriesInfluxDB, TimescaleDB
Key-value cacheIn-memoryRedis, Memcached
Graph relationshipsGraphNeo4j
SearchSearch engineElasticsearch, OpenSearch
Wide-columnColumn-familyCassandra, DynamoDB

TopicKey Question
normalizationShould I normalize or denormalize my schema?
indexingHow do I design indexes for performance?
opm-or-not-to-ormShould I use an ORM or raw SQL?
cdnWhen should I use a CDN?
hashingWhat hashing algorithm for what purpose?

  • caching — Caching layer in front of databases
  • availability — Database availability patterns
  • README — Async data pipelines