Skip to content

14.5 Databases, Persistent Storage & Evidentiary Custody ​

1. What It Is in Plain Words ​

Database and storage architecture determines how an application persists, indexes, retrieves, and protects data over time. In digital forensics, storage systems must balance structured relational integrity (user permissions, audit trails) with high-capacity immutable object custody (videos, images, binary hashes).


2. TruthGuard Storage Topology ​


3. Database Engine Comparison Matrix ​

EngineData ModelACID ComplianceHorizontal ScalingQuery LanguageBest Use in TruthGuard
PostgreSQL (Chosen)RelationalFull (Strict)Read ReplicasSQLProfiles, Audit Logs, Case Integrity
MongoDBDocument JSONDocument-levelNative ShardingMQLGood for flexible incident logs
DynamoDBKey-Value / DocEventual / StrongNative Auto-scaleDynamo APIHigh-throughput sensor streams
CockroachDBDistributed SQLFull (Serializable)Native Multi-MasterSQLMulti-region global compliance
RedisIn-Memory K-VMinimal (RDB/AOF)Cluster ShardingRedis CommandsDeduplication & Semantic Cache
IndexedDBIn-Browser NoSQLTransactionalLocal MachineJS Cursor APILarge client evidence storage

4. CAP & PACELC Theorem Evaluation ​

TruthGuard’s relational data sits squarely as a CP system (Consistency over Availability during network partitions) under the CAP theorem:

  • Consistency Priority: In a forensic cyber-defense system, having two analysts observe conflicting role definitions or divergent audit timestamps is unacceptable. PostgreSQL enforces strong serializability and immediate consistency.
  • PACELC Classification: Under the PACELC theorem, TruthGuard is PC/EC (Partition: Consistency over Availability; Else: Consistency over Latency). The platform prioritizes exact evidentiary accuracy over millisecond response latency.

5. 30-Second Spoken Interview Answer ​

"For persistent storage, TruthGuard pairs PostgreSQL for structured relational data with client-side storage for active evidence. We chose PostgreSQL because digital forensics requires strict ACID guarantees and Row Level Security to protect analyst profiles and evidence custody trails.

Under the CAP theorem, we deliberately prioritize Consistency over Availability (CP) because evidentiary records can never allow dirty reads or split-brain inconsistencies."