Skip to content

Article · 8 min read · Oct 31, 2026

SQL vs NoSQL: which database should a business application start with?

Most business applications should start on a relational (SQL) database, usually PostgreSQL or MySQL, and add a NoSQL system only for a specific workload that needs it. Two old beliefs no longer hold: NoSQL products now offer transactions, and relational databases scale much further than their reputation suggests. This guide is for owners and operations leaders at companies of roughly 20 to 200 people who are approving a database choice.

Farzan AnsariCofounder and CTO

Key takeaways

  • Start relational by default, because business data such as customers, orders and invoices is full of relationships and rules that a relational database enforces for you.
  • MongoDB and DynamoDB both offer ACID transactions today, but with limits, so "NoSQL has no transactions" is out of date.
  • Relational databases scale through read replicas, partitioning and, much later, sharding, and companies like Notion and Meta run sharded relational systems at very large scale.
  • PostgreSQL can store flexible JSON documents with indexes, which removes the most common reason to pick a document database.
  • NoSQL earns its place for specific jobs: very high key-based throughput, caching, search, graph relationships and self-contained documents.

Someone chooses a database in the first weeks of a project, and the company lives with that choice for a decade. The pitch for NoSQL usually arrives with two claims: relational databases cannot scale, and flexible schemas move faster. Both claims were stronger a decade ago than they are today, and picking on the strength of them is how small companies end up running infrastructure built for a problem they do not have.

SQL vs NoSQL: which should a business application start with?

Start with a relational database. For the customers, orders, invoices, inventory and approvals that most business software handles, a relational database enforces the rules and answers new questions without redesign. Choose NoSQL when you can name a specific workload that a relational database handles badly.

A relational (SQL) database stores data in tables of rows and columns, links tables through shared keys, and is queried with the SQL language. NoSQL is an umbrella term for databases that do not use that table model. AWS lists key-value, document, graph, in-memory and search databases as NoSQL types, and the differences between them are larger than the differences inside the SQL family.

QuestionRelational (SQL)NoSQL (document or key-value)
Data modelTables with relationships through keysOne record holds everything about one thing, looked up by key or by document
SchemaDefined up front and enforced by the databaseFlexible, so the application usually enforces structure
TransactionsMulti-table ACID is the normal caseVaries by product; MongoDB and DynamoDB both offer ACID transactions with limits
ScalingScale up first, then read replicas, partitioning and shardingBuilt to spread across servers from the start
Query flexibilityAny question across any tables, using joinsFast for the access patterns you designed for, costly for new ones
OperationsOne mature toolset most engineers knowDiffers per product, with fewer people who know each one
Default for a 20 to 200 person companyYesOnly for a named workload

ACID means a group of changes either all succeed or all fail, and nobody sees a half-finished state. A schema is the declared structure of the data: which fields exist and what type each one holds.

How do the data model and schema differ?

A relational database makes you decide the structure first, and that discipline is the main benefit for business data. If an invoice must belong to a customer, the database can refuse an invoice with no customer. The rule lives in one place instead of in every application that writes invoices.

A document database stores each record as a self-contained document. MongoDB's data modeling guide states the principle directly: data that is accessed together should be stored together. It also describes the flexibility: documents in one collection do not need the same fields, and you can add fields without a schema migration. MongoDB adds that you can enforce a fixed structure with schema validation if needed.

That flexibility helps when records genuinely differ in shape, such as product listings with different attributes per category. It hurts when the shape is not actually flexible. An order always has a customer, line items and a total, so a flexible schema just moves enforcement into application code, where every team has to remember it.

Do NoSQL databases support transactions?

Yes. The belief that NoSQL means no transactions is out of date for two of the best-known products.

MongoDB's manual says it supports multi-document ACID transactions, and that they are available in all supported MongoDB versions. The same page adds a caution: in most cases a distributed transaction costs more than a single-document write, and transactions should not replace good schema design. MongoDB's own advice is to embed related data so that fewer transactions are needed.

Amazon DynamoDB also offers ACID transactions. A single write transaction can group up to 100 actions on up to 100 items in the same AWS account and Region. The aggregate size limit is 4 MB. DynamoDB performs two underlying reads or writes for every item in a transaction, one to prepare and one to commit, and you pay for both. Transactions cannot be performed using indexes, and in global tables the guarantees apply only within the Region where the write was made.

The honest summary: transactions exist, but they are an added feature with limits on a system designed around single records. In a relational database they are the default, and the limits are far looser. If your application regularly changes several kinds of records together, such as an order, its stock levels and a ledger entry, that fit favors relational.

Can SQL databases scale?

They scale further than their reputation, and the way they scale is well understood. A single database server has a ceiling, and the order in which companies hit it is predictable.

  1. Read replicas. A read replica is a read-only copy of the database. AWS describes using replicas to scale beyond the capacity of a single instance for read-heavy workloads, and to run business reporting away from production. Replicas update asynchronously, so they can lag slightly.
  2. Partitioning. Splitting one large table into smaller physical pieces. The PostgreSQL documentation gives a rule of thumb that a table benefits when its size exceeds the physical memory of the database server.
  3. Sharding. Spreading data across several database servers. Notion described (in a post dated October 6, 2021) splitting its Postgres data into 480 logical shards spread across 32 physical databases. Meta's engineering team wrote in 2013 that TAO, its social graph store, partitions its data into hundreds of thousands of shards backed by MySQL.

Sharding is real work, and Notion's post notes that distributed joins are expensive and transactions are typically limited to a single host. MongoDB's own documentation makes the same point about its approach: spreading data over many servers can cost less than one high-end machine, but the trade-off is increased complexity in infrastructure and maintenance. NoSQL systems that spread data automatically remove some of that work and add constraints elsewhere.

A reasonable rule for a company of 20 to 200 people: the write volume of your internal systems, customer portal and operational data very rarely exceeds what one properly sized, well-indexed database server can handle. When it does, read replicas come before anything more drastic.

Can PostgreSQL handle flexible, document-style data?

Yes, and this removes the most common reason to choose a document database. PostgreSQL's jsonb type stores JSON in a decomposed binary format. The PostgreSQL 18 documentation says jsonb is significantly faster to process than plain JSON, supports indexing, and that most applications should prefer jsonb unless they have quite specialized needs. Its GIN index type can search for keys or key and value pairs across a large number of jsonb documents.

The practical pattern: keep the stable core of your data in ordinary columns, and put the variable part, such as product attributes or form responses, in a jsonb column on the same row. You get flexibility where you need it and relational rules everywhere else, in one database with one backup.

When does NoSQL earn its place?

NoSQL earns its place when a workload has a shape that tables handle awkwardly, and you can name it. Typical cases:

  • Very high throughput on simple, key-based lookups. Session data, device telemetry or event streams where every request fetches or writes one item by its key, at a volume beyond one server.
  • Caching. Redis describes itself as an in-memory data store used as a cache, among other roles. A cache in front of a relational database is one of the most common and least risky additions.
  • Self-contained documents with genuinely varied shapes that are almost always read and written as a unit.
  • Relationship-heavy questions such as connections between people, accounts or devices, where a graph database fits.
  • Full-text search across large volumes of content, where a search engine beats database queries.

Each of these is a supporting role beside a relational system of record. Our guide to the types of databases covers the full list, including time-series, wide-column and vector databases.

Popularity is not proof, but it has practical weight for hiring and tooling. In the 2026 Stack Overflow Developer Survey, PostgreSQL ranked first among databases at 57.9%, MongoDB was at 19.0% and DynamoDB at 9.3%.

Illustrative example: Consider a 90-person building-supplies distributor commissioning a customer portal and an order system. A vendor proposes MongoDB because "orders vary a lot." Walking through the actual requirements, every order has a customer, a price list, line items, an approval and an invoice, and a stock change must succeed or fail together with the order. That is relational data with transactional rules. The team chooses PostgreSQL, stores the varying product specifications in a jsonb column, and adds a cache only if portal pages turn out to be slow. If the company later ingests sensor data from delivery trucks at high volume, that stream can go to a purpose-built store without disturbing the order system.

How do you decide between SQL and NoSQL?

Work through these questions in order.

  1. Do changes touch several kinds of records together? If yes, choose relational.
  2. Will the business keep asking new questions of the data, such as reports by region, customer type and month? If yes, choose relational. Joins answer unplanned questions cheaply.
  3. Is the data mostly independent records read by key, at a volume beyond one server? Consider a key-value or wide-column store for that workload only.
  4. Is the flexible part small? Use a jsonb column inside the relational database.
  5. Do you already operate one of these systems well? Existing skill is a real input. A database your team can run and recover at 2 a.m. beats a theoretically better one nobody understands.

Whatever you choose, keep database access behind one layer of the application code and write down why you chose it. That makes a later change a project instead of a rewrite.

How Kastling approaches database choices

Database selection is part of the design work in Custom Solutions: internal tools, dashboards, portals and web or mobile applications built around how a business actually works. Kastling would start from the business records and rules involved, the questions people need answered and the existing systems the data must connect to, and then pick the simplest database that fits. Any added system would need a named reason and a named owner, and success measures would be agreed up front. For related decisions, see our guides to why PostgreSQL became the default database and what drives the cost of custom software.

Questions

Can one application use both SQL and NoSQL databases?

Yes, and mature systems often do. AWS notes that combining the two in one application is common. A typical split keeps the system of record in a relational database and puts a cache, a search index or a high-volume event store in a specialized system. Each extra database adds backups, access control, monitoring and a person who understands it, so add one only for a named reason.

Is PostgreSQL a NoSQL database because it supports JSON?

No. PostgreSQL is a relational database that also has a document-friendly column type. You still get tables, joins, constraints and transactions around the JSON data, which is the reason many teams use it for the flexible part of an otherwise structured application.

How hard is it to switch from one to the other later?

Harder than switching hosting providers and easier than rewriting the application. The data has to be reshaped, because a relational model and a document model organize the same facts differently, and every query in the code changes. That is the main argument for choosing carefully at the start, and for keeping database access in one layer of the code.

Which one costs less to run?

It depends on the workload, so no honest general answer exists. The larger cost for a company of this size is usually people: the engineers who have to learn, operate and debug the system. A widely understood relational database is usually the cheaper choice on that measure.

Sources

  1. AWS: What is NoSQL?
  2. MongoDB Manual: Transactions
  3. MongoDB Manual: Data Modeling Introduction
  4. AWS DynamoDB Developer Guide: Transactions, how it works
  5. PostgreSQL 18 documentation: JSON types
  6. PostgreSQL 18 documentation: Table partitioning
  7. PostgreSQL 18 documentation: High availability, load balancing, and replication
  8. AWS RDS User Guide: Working with DB instance read replicas
  9. Notion: Herding elephants, sharding Postgres at Notion
  10. Engineering at Meta: TAO, the power of the graph
  11. Redis documentation: Get started with Redis Open Source
  12. Stack Overflow Developer Survey 2026: Technology

Guide · 15 min read

Build, buy or integrate: deciding on custom business softwareBuy software for standard processes, integrate when your existing systems already hold the data, and build only where the process sets you apart. Companies of 20 to 200 people usually end up with a hybrid: buy the core system of record, then integrate or build the edges around it. Compare the options on 3 to 5 year total cost of ownership, not on the first invoice.Read

Article · 8 min read

Rust vs TypeScript: when to use eachTypeScript is the right default for web applications, APIs and business software because of its hiring pool, speed of change and ecosystem. Rust earns its higher cost in CPU-heavy paths, latency-critical services, embedded and edge work, and anywhere memory safety and predictable performance matter. The two are often combined, and this guide is for owners and technical leads at companies of 20 to 200 people deciding what to build in.Read

Article · 8 min read

Sentry vs PostHog: which one does your team need?Sentry is built for developers who find and fix errors and performance problems, and PostHog is built for product teams who need to understand user behavior through analytics, session replay, feature flags and experiments. Each has moved into the other's territory: PostHog now offers error tracking and Sentry offers session replay. This guide is for technical leads and product owners choosing monitoring for a web application, and for small teams deciding whether one tool is enough.Read

One useful email a month.

New guides, tools and practical notes on putting AI to work. No sales sequences.

See how an idea becomes a working solution.

Explore how we scope, build and hand over AI projects, with clear decisions at each stage.