When a SaaS product sells to banks, hospitals or large enterprises, compliance stops being a document and starts shaping the system. Customers send security questionnaires, ask for a SOC 2 report or ISO 27001 certificate, and write data processing terms into their contracts. Depending on the market, the product may also need to meet GDPR, PCI DSS or HIPAA.
None of these frameworks tells you which database or language to use. They describe outcomes: data is protected, access is controlled, changes are reviewed, incidents are noticed. The stack you choose decides how hard it is to show those outcomes, year after year, to people whose job is to doubt you.
What compliance actually constrains
Strip away the paperwork and most requirements fall into a handful of technical areas.
- Data residency. Some customers or regulations require data to stay in a region. GDPR restricts transfers of personal data out of the European Economic Area unless specific safeguards are in place, and many buyers simply ask for EU hosting to avoid the question. This decides your cloud regions, and also where your backups, logs, email provider and support tools keep their copies.
- Audit trails. You need to show who did what, when, and from where: in the product, in the infrastructure and in the code. These records must be hard to alter and kept for a defined period.
- Access control. Staff should reach only what their role needs, with strong authentication and a record of each grant. Access to production data should be rare, justified and logged.
- Encryption. Data encrypted in transit and at rest is the baseline. The harder questions are who controls the keys, how they rotate, and whether some customers need their own.
- Retention and deletion. You must keep some records for years and delete others on request. GDPR's right to erasure reaches into backups, analytics copies and logs, which is where most systems struggle.
Map each requirement you face onto these areas before choosing anything. The mapping becomes the checklist every later decision is tested against.
Managed services or running them yourself
A managed database, queue or key service from a major cloud provider comes with the provider's own certifications and a shared responsibility model. The provider proves the physical security, patching of the platform and durability. You prove how you configured it and who can reach it.
That split usually favours managed services for a compliance-heavy product. Every component you run yourself adds evidence you must produce: patch records, backup tests, vulnerability scans, access reviews. A small team can spend a surprising share of its time proving that a self-run database is looked after.
There are reasons to run things yourself. A customer may require on-premises or single-tenant deployment. A managed service may not be available in the region you need. For HIPAA, a provider must sign a business associate agreement, and not every service in its catalogue is covered by it, so check the list before choosing. For card data, the usual advice is to keep it out of your systems entirely by using a payment provider's hosted fields or tokenisation, which shrinks the scope of PCI DSS to a fraction of the stack.
Choose managed by default, and self-run only where a requirement forces it.
Choose boring, well-supported tools
Auditors and enterprise security teams are more comfortable with technology they recognise, and so are the engineers who will maintain the system in five years. For a compliance-heavy product, boring is a feature.
Useful tests for each component:
- Is it widely used, actively maintained, and does it publish security advisories?
- Does it support the controls you need natively: encryption, fine-grained permissions, audit logging, single sign-on?
- Can you hire people who know it?
- Does the vendor, if there is one, publish its own compliance reports?
A mainstream relational database, a mainstream language and framework with a long security track record, and a major cloud provider will pass most of these tests. A new database with an exciting data model may be the right choice for a product, but in this context it needs a stronger reason than interest.
Keep the number of components small. Every extra service is another data flow to document, another vendor to assess and another place personal data might leak into.