PostgreSQL
A relational database we use as the primary data store for transactional systems, reporting layers, and increasingly as metadata and vector storage for AI-assisted retrieval — chosen for its consistency guarantees and relational model, not applied as an unconditional default for every kind of data.
PostgreSQL is the relational database we use as the primary data store for most of the systems we build — from transactional application backends to reporting and analytics layers, and increasingly as metadata and vector storage for AI-assisted retrieval. It gives us strong consistency, a mature relational model, and genuine extensibility, though it isn't the only reasonable choice for genuinely unstructured or rapidly-evolving data.
Where it fits
Most business systems have data with real structure and real relationships — customers who place orders, policies that have claims, accounts that have transactions — and those relationships carry rules that matter: a payment shouldn't exist without an order, a balance shouldn't go negative because two updates ran at once. PostgreSQL's relational model and transactional guarantees enforce that structure at the database layer, rather than leaving it entirely to application code to get right every time.
It's also more than a plain relational database in practice. Native support for JSON columns, full-text search, geospatial queries (via PostGIS), and vector similarity search means a single PostgreSQL instance can often cover data needs that would otherwise require running two or three specialised databases side by side. For teams without the operational capacity to run and maintain multiple data stores, that consolidation is a genuine practical advantage, not just a convenience.
The trade-off is schema flexibility. A relational schema has to be designed and migrated deliberately, which is more overhead than a document store's schema-less writes when data is genuinely unstructured or changes shape frequently and unpredictably. For most business data — which has a reasonably stable shape even as fields get added over time — that overhead buys correctness and query power that a document store doesn't provide in the same way.
We also don't treat it as the automatic answer to every storage problem. For workloads that are genuinely document-shaped, have no meaningful relationships to enforce, or need to scale writes horizontally in ways that outgrow what a single relational instance handles comfortably, another data store is frequently a better architectural fit — and we scope the decision to the workload rather than to habit.
Core capabilities
- ACID-compliant transactions for data that must stay consistent
- Foreign keys and constraints enforced at the database layer
- Row-level locking and concurrency control for multi-user systems
- JSON/JSONB columns for semi-structured data alongside relational tables
- Full-text search without a separate search engine for moderate-scale needs
- Geospatial queries and indexing via the PostGIS extension
- Vector similarity search via the pgvector extension
- A single store for both application data and retrieval-augmented generation metadata
- Hybrid queries combining relational filters with vector similarity
- Point-in-time recovery and mature backup tooling
- Well-understood replication and read-scaling patterns
- Broad support across managed cloud database services
Common use cases
- Transactional application backendsThe primary data store behind a web or mobile product where relationships and consistency matter — orders, accounts, policies, records.
- Reporting and analytics layersA queryable store of record that feeds dashboards and reports, often alongside a dedicated analytics pipeline for larger volumes.
- RAG metadata and vector storageStoring document metadata and embeddings for retrieval-augmented generation alongside the application data that references them.
- Multi-tenant SaaS dataStructured, relational data for SaaS products where tenant isolation and data integrity are core requirements, not afterthoughts.
Architecture & integration considerations
- Schema design and migrationsA deliberate schema, with migrations managed as part of the deployment process, since relational schema changes need more coordination than schema-less writes.
- Indexing strategyIndexes chosen to match actual query patterns rather than added reflexively, since over-indexing has its own write-performance cost.
- Read/write scaling approachA decision, made per project, on read replicas, connection pooling, and partitioning based on actual load rather than pre-emptive over-engineering.
- Extension usageDeliberate choices about which extensions (PostGIS, pgvector, others) a project actually needs, since each adds an operational dependency to manage and upgrade.
Strengths
- Strong consistency and data integrityACID transactions and enforced constraints mean the database itself prevents a class of data-corruption bugs, rather than relying entirely on application logic.
- Genuine extensibilityJSON columns, full-text search, geospatial data, and vector similarity search in one system reduce the need to run and operate multiple specialised databases.
- Mature and well understoodDecades of production use mean its failure modes, performance characteristics, and operational tooling are well documented, reducing the odds of unpleasant surprises.
- Broad ecosystem supportAvailable as a managed service across every major cloud provider, which keeps hosting and operational options open rather than locking a project into one vendor's proprietary database.
Trade-offs & limitations
- Less flexible schema than a document storeGenuinely unstructured or rapidly-evolving data — where the shape of records varies significantly and changes often — is more naturally handled by a schema-less document store than by a relational schema that needs deliberate migrations.
- Horizontal scaling takes more deliberate architectureScaling writes across many nodes requires explicit partitioning or sharding strategy; some NoSQL databases are built around horizontal scale-out from the start, which can be simpler for workloads that genuinely need it.
- Not a specialised search or analytics engineFor very large-scale full-text search or heavy analytical workloads, a dedicated search engine or columnar analytics store will usually outperform PostgreSQL doing the same job.
- Relational modelling has a learning curveDesigning a correct, well-normalised schema takes more upfront thought than writing arbitrary JSON documents, which can slow initial development on projects where the data model is still being discovered.
When to use it
- The data has real structure and relationships that benefit from being enforced at the database layer
- Transactional consistency (payments, bookings, inventory, records) is a genuine requirement, not a nice-to-have
- The project benefits from consolidating relational data, search, geospatial, or vector storage in one system
- The team wants a mature, widely supported database with predictable operational behaviour
When another option may be more appropriate
- The data is genuinely unstructured or its shape changes so frequently that a schema becomes a constant maintenance burden
- Write volume needs to scale horizontally across many nodes in a way a single relational instance can't comfortably support
- The workload is dominated by large-scale full-text search or analytics better served by a purpose-built engine
- An existing database in the client's stack is stable and a migration isn't justified by the requirements
Relevant services
- Custom Software DevelopmentDesign and development of secure, scalable custom software for companies across Sweden and the Nordic region.
- Data Engineering & AnalyticsData pipelines, warehousing, quality validation and BI reporting built to make scattered operational and sensor data reliable enough to trust.
- AI DevelopmentProduction-oriented AI systems, assistants, RAG platforms and intelligent automation for Nordic businesses.
Relevant industries
- FinTechCustom fintech software: open banking API integration, KYC workflow automation and data platforms. North Tech Labs is not a licensed payment institution.
- HealthcareCustom scheduling, patient-portal and referral-workflow software for healthcare providers, plus data integration with existing EHR/EMR systems.
- Retail and eCommerceCustom retail and eCommerce software — omnichannel inventory, checkout, personalization and returns systems for companies across Sweden and the Nordic region.
Representative solutions
Alternatives & complementary technologies
- MongoDBA document database that fits genuinely unstructured or fast-changing data well, trading relational integrity and join capability for schema flexibility.
- MySQLA comparable relational database, sometimes preferred where a client's team, hosting environment, or existing tooling is already standardised on it.
- Dedicated search or analytics enginesFor very large-scale full-text search or heavy analytical workloads, a purpose-built engine often outperforms a relational database doing the same job.
Frequently asked questions
Is PostgreSQL always a better choice than a NoSQL database?
No. It's a strong fit for structured, relational data with real consistency requirements. For genuinely unstructured or rapidly-evolving data, a document store like MongoDB is often a better architectural fit.
Can PostgreSQL handle AI and vector search workloads?
Yes, via the pgvector extension, which supports vector similarity search alongside regular relational queries. For most retrieval-augmented generation use cases, this avoids the operational overhead of running a separate vector database.
Does PostgreSQL scale to handle significant traffic and data volume?
Yes, with the right architecture — read replicas, connection pooling, partitioning — but scaling well is a design decision, not an automatic property of choosing PostgreSQL.
Do you use PostgreSQL for every project?
No. It's our default relational database because it fits most projects with structured data, but we recommend a different data store when a project's data or scaling requirements call for one.
Considering PostgreSQL for your next project?
Tell us what you're building — we'll confirm whether this is the right technology choice before recommending anything.