MICROSIVE

When PostgreSQL is enough for a business app

Rahul Jaiswar, founder ·

Reviewed by Rahul Jaiswar.

Key points

  • Most business apps (CRMs, ERPs, booking systems, portals, internal tools) fit well in one PostgreSQL database.
  • PostgreSQL handles JSON data, full-text search, location data and row-level access rules, as well as ordinary tables.
  • For search, including search behind an AI assistant, start with PostgreSQL’s full-text search. Add vector search only when testing on your real questions shows keyword search misses too much.
  • Add a second system when you can name the job it does: a cache or queue, a dedicated search engine for a large catalogue, a warehouse for heavy analytics, object storage for files.
  • Tested backups, hosting location and a data model that fits your business matter more than the database brand.

Yes, for most business apps

Early in a project, someone usually proposes more. MongoDB “in case we scale”. A separate search engine. A vector database for AI features. An analytics store. Each one is another system to host, back up, secure, keep in sync and pay for.

For a business app, one well-designed PostgreSQL database usually does the job, and it leaves room to add a specialist system later, once you can see the need.

Business data is mostly relationships

A customer has many orders. An order has line items. Each line item has a product, a GST rate and a warehouse. An invoice belongs to a GSTIN and a financial year. A payment is allocated against one or more invoices.

Relational databases were built for this. PostgreSQL enforces the links between records, so you can’t save a line item for an order that doesn’t exist. Transactions make a stock deduction and its invoice save together or not at all. Those rules prevent the quiet errors that surface months later in your accounts.

What else it covers

JSONB columns hold data whose shape varies, such as product attributes by category, form answers or raw webhook payloads, indexed and searchable beside your structured tables.

Full-text search handles customers, tickets, notes, help articles and modest catalogues without a separate service. It understands word forms, ranks results, and can weight a title above body text.

Row-level security lets rules inside the database keep each branch, franchise or client to its own rows, as a second line of defence behind the application’s checks.

The PostGIS extension handles distances, delivery zones and service areas. Partitioning splits very large tables, such as years of logs, so queries stay quick. For modest workloads, PostgreSQL can even hold a job queue.

Search for AI answers: keywords first

If you’re adding an assistant that answers from your own documents or help content, it’s tempting to start with embeddings and a vector store. Try full-text search first.

Many support questions share words with the answer: “reset password”, “GST invoice”, “change plan”. Keyword search finds those well, it’s easy to debug (you can see why a result matched), and it needs no extra system. Build a test set of real questions, check what the search returns, and add vector search only for the gaps you can see, such as questions phrased very differently from your content. Even then, a PostgreSQL extension such as pgvector can add vector search to the same database, so a separate vector store is rarely the first step. For typo tolerance, try trigram matching with the pg_trgm extension before adding a separate search engine. For the engineering side of retrieval for AI answers, see our RAG page.

The support chatbot inside Microsive ATS answers from PostgreSQL full-text search, without vectors.

We build a bot like this, test it and manage it. Before it goes into full production it is tested live and actively on real customers, over a closely monitored period, with us reading the answers as they happen. Anything that needs adjusting is adjusted in real time, while that period is still running.

When to add something next to it

What to add beside PostgreSQL, and the sign you need it
NeedWhat to addSign you have the need
Caching, rate limits, busy job queuesRedis or similarThe same expensive queries run constantly, or background jobs pile up
Search over a large product catalogueA search engine such as Elasticsearch, OpenSearch, Meilisearch or TypesenseShoppers need typo tolerance, facets and tuned ranking that database search struggles to give
Heavy analyticsA column-oriented warehouse such as ClickHouse or BigQueryReports scan huge event tables and slow down the app your staff use
FilesS3-compatible object storageYou store PDFs, images, recordings or resumes. Keep the files outside the database and store their location
Offline use on phonesA local database on the device, such as SQLite, that syncsField staff must keep working without signal

“We might scale” is missing on purpose. Many business apps run on one well-tuned PostgreSQL server for their whole life, and a bigger server or read replicas go a long way before anything more is needed.

Document databases like MongoDB suit data with little fixed shape and few relationships, such as varied content read whole. Customers, orders, invoices and payments are relationships, and PostgreSQL keeps them consistent with less effort.

What deserves more attention than the database

Test-restore your backups. Ask for point-in-time recovery, so data can go back to the moment before a mistake.

Decide the hosting region before launch. The major cloud providers run data centres in India, and some customers, contracts or sectors expect data to stay here.

Get the entities right: one customer with several GSTINs, one product sold in different units, branches sharing stock. This matters far more than which database stores them. Design who can see salaries, margins and phone numbers from the start, and write schema changes as versioned migrations so test and live always match.

Our use of it

PostgreSQL runs Microsive ATS (with Prisma, and Redis for job queues) and other apps we build. Our PostgreSQL page covers what to check. If your current app has data problems baked in, our guide on rebuilding versus refactoring may be the better starting point.

Planning a business app? Send us the main records it has to track and how they relate.

Related service: Web apps