The architecture review board approved the migration to a document database for the new core ledger. The proposal highlighted horizontal scalability, flexible schemas, and developer velocity. The project plan included a line item for database migration. It did not include a line item for rebuilding row-level security, audit trails, or constraint enforcement in application code. Those were not features of the new system. They were things the old database did.
When an enterprise moves a regulated financial workload from a relational database to a key-value or document store, the requirements for data integrity, security, and history do not disappear. They migrate into the application layer. Development teams end up writing bespoke, poorly tested versions of declarative constraints and temporal tables in Java or Node. You are paying engineers to rewrite database features from scratch, and nobody puts that work on the sprint board because nobody thinks of it as a new feature until the old one is gone.
The primary argument for these NoSQL databases is that they are optimized for known access patterns. If you know exactly how the application will read and write data, a single-table design or a document store is highly efficient. The hidden premise is that you know all the access patterns. In a pension fund, an insurer, or a custodian, you know the access patterns you designed for daily operations. The ones that cause the most damage are the ones you did not anticipate.
A regional regulator initiates a sudden review of a specific trading desk following a market anomaly. They want the state of the order book as it existed at a specific minute on a Tuesday three months prior. If the data is in a relational database with system-versioned temporal tables, a database administrator runs a single query with a time-travel clause and delivers the extract by noon. If the data is in a document store, the current state is in the table, but the history is in a change data capture stream feeding a data lake. Reconstructing the customer state requires a distributed computing job. The auditor does not care about your application access patterns. The auditor cares about their question. A full table scan is not a query. It is a confession that you do not have the index you need.
In institutional finance, the database is not just a storage layer. It is a control environment. Row-level security, temporal history, and foreign keys are regulatory controls. When you move to a data store that lacks these features, you do not eliminate the controls. You relocate them into application code, where they are harder to audit, harder to test, and easier to bypass.
Consider row-level security. In a mature relational database, the engine evaluates security policies at the query execution phase. The database binds the execution context to the session and rewrites the execution plan to filter rows based on the user identity, regardless of whether the request comes from the main application, an internal analytics tool, or an overnight batch export. In a key-value store, the database does not know who the user is. The security logic must live in the application API. If a support engineer or a data repair script connects directly to the database, the API is bypassed, and the security control fails. Every constraint you do not declare in the database is a constraint you must enforce in every application that writes to it.
The same logic applies to data validation. A document database allows you to write JSON without strict structural validation, which proponents argue provides development velocity. In a custody bank, a missing field in a trade execution record is a compliance breach. If the validation is not enforced by the database engine, it relies entirely on defensive coding scattered across microservices. When a downstream service updates a client portfolio document but drops a required tax residency attribute, the database accepts the write. The error is discovered weeks later when a reporting engine crashes. You did not eliminate the schema. You just moved the enforcement to a developer pull request.
The scale argument often assumes a scale the workload does not actually have. The pitch for horizontal scaling is built on the back of global retail shopping carts or social media feeds. Institutional financial systems rarely fail because they cannot process enough writes per second. A pension fund member record, an insurer policy, or a custodian holding is complex, regulated, and long-lived, but it is not high-frequency consumer traffic. A well-tuned relational database on modern hardware handles the volume. The choice to migrate is often made for operational reasons, like avoiding database administration, rather than actual scale requirements.
Eventually, the missing capabilities force a compromise. The audit team needs to run ad hoc queries. The reporting team needs to join customer data with transaction data. The reconciliation team needs to find orphaned records. The original relational database handled all of this natively. To solve the problem, the engineering team builds a relational sidecar. They set up a pipeline to stream changes from the document store into a relational database for everything else. Now the architecture has two systems, two consistency models, and an integration pipeline that introduces latency and requires its own maintenance. The relational database was the integration point. You removed it and replaced it with a custom data pipeline.
There is also the problem of operational memory. The team that builds the NoSQL solution encodes business rules directly into the access pattern design and the partition key structure. There is no schema to read and no query planner to explain the data model. When the original architect leaves, the remaining engineers inherit a system where the answers exist only in a wiki page and the head of a missing colleague. In a relational database, the schema is the documentation.
None of this means regulated applications must exclusively use relational databases. If an organization assesses the trade, understands that it is giving up automatic controls, and explicitly budgets for the engineering effort required to rebuild those controls in the application layer, that is a legitimate architectural decision. The failure happens when the migration plan only prices the database and ignores the controls.
The estimate had a line for database migration. The actual work required rebuilding the controls the old database enforced automatically.
