Skip to content

PostgreSQL

One database for structured data, flexible documents and AI embeddings – cleanly modeled and fast.

PostgreSQL is our standard database for web applications, SaaS platforms and AI applications – in client projects as well as in our own products. We model data, optimize queries and set up backups, replication and access rules.

For type-safe access from TypeScript, we use Prisma, Drizzle or TypeORM depending on the project. For AI applications, we store embeddings with pgvector right next to the other data.

We have already migrated existing databases from Microsoft SQL Server to PostgreSQL – with tests on real data and a plan for the switchover.

Official website Michael Jauk Your contact Michael Jauk Contact for backend & architecture

What is PostgreSQL – and when is it worth it?

PostgreSQL is an open-source relational database with strong SQL compliance, transactional safety and many extensions – such as JSONB for flexible data, full-text search and pgvector for vector search. All major cloud providers offer it as a managed service.

PostgreSQL is worth it for almost every business application with structured data, relationships and transactions. Other systems fit better for pure key-value access with extreme throughput, or for very large analytical data volumes that column-oriented analytics databases are built for.

pgvector or a separate vector database?

pgvector in PostgreSQLSeparate vector database
Operationone database for data and embeddingsan additional system
Consistencydata and embeddings in the same transactionsyncing between two systems required
Access rightsthe same rules as for all data, e.g. row-level securitya separate permission model
Searchvector search with HNSW index, combinable with SQL filtersspecialized in vector search
Suited formost RAG applications in companiesvery large vector volumes, special search features

Capabilities

What We Build with PostgreSQL

Relational Data Modeling JSONB & Flexible Data Structures Full-Text Search pgvector for Embedding Search Prisma / Drizzle / TypeORM Migrations & Schema Management Performance Tuning & Indexing Replication & High Availability Backup & Recovery Row-Level Security

Use Cases

Typical Use Cases

SaaS Platforms with Many Tenants

Data storage where row-level security in the database ensures that each tenant sees only their own data.

AI Applications with Vector Search

Embeddings with pgvector right next to business data – for RAG and semantic search without an additional vector database.

Migration from SQL Server

Moving existing databases from Microsoft SQL Server to PostgreSQL, including data types, queries and stored procedures.

FAQ

PostgreSQL FAQ

Why does dectria use PostgreSQL?
Because PostgreSQL has everything most business applications need: reliable transactions, flexible JSON data, full-text search and, with pgvector, vector search. It is open source, without license costs, and available as a managed service from all major cloud providers.
Can PostgreSQL be used for AI projects?
Yes. With the pgvector extension, PostgreSQL stores embeddings and searches them by similarity, including with an HNSW index. Because embeddings sit next to the other data, the same access rights apply, and vector search can be combined with normal SQL filters.
How do you separate the data of different tenants in PostgreSQL?
Depending on the requirements, with a tenant column and row-level security, with separate schemas per tenant or with separate databases. Row-level security enforces the separation in the database itself – even if a filter is missing in the application code.
Can dectria migrate a database from SQL Server to PostgreSQL?
Yes, we have done this before. We transfer the schema, data types and stored procedures, test with real data and plan the switchover to keep downtime as short as possible. Afterwards, we optimize indexes and queries for PostgreSQL.
Which ORM does dectria recommend?
That depends on the project. We work with Prisma, Drizzle and TypeORM. Drizzle stays close to SQL, Prisma offers its own schema with convenient migrations, and TypeORM fits well with NestJS projects. For complex analysis, we write SQL directly.

Every project starts with a conversation.

Let us talk about your individual needs and goals.

Start a project