ADR-005 Accepted 2026-07-03

ADR-005: BigQuery + Firestore over a Single Database

Why operational state lives in Firestore while analytics live in BigQuery.

ADR-005: BigQuery + Firestore over a single database

Context

SecureVault needs two distinct storage capabilities: fast, schema-flexible operational state for recent findings, and cheap SQL analytics for trend reporting and audit review. A single database would force one access pattern to suffer.

Decision

Use Firestore for operational state and BigQuery for historical analytics.

Consequences

Positive:

Negative:

Alternatives considered

AlternativeProsConsVerdict
Firestore onlySimple, fast lookupsExpensive for analytics; limited SQL supportRejected; analytics are a first-class requirement.
BigQuery onlySingle store, powerful SQLToo slow for operational lookups; streaming insert cost per queryRejected; operational state needs sub-second lookup.
Cloud SQL (PostgreSQL)Familiar SQL, strong consistencyBaseline cost and operational overhead even at low scaleRejected; overkill for current volume.

References