SQL vs NoSQL vs Graph Databases: Modern Data Storage Choices (2026)

notes
Three database schema diagrams side by side showing relational tables, document structure, and a node graph

The database landscape in 2026 is simultaneously more mature and more confusing than it has ever been. SQL databases have adopted features that were once NoSQL selling points (JSON columns, horizontal scaling). Document databases have added transaction support that was once an SQL advantage. Graph databases have found their niche but remain misunderstood.

This note provides a framework for choosing the right database category for your workload — without the tribal loyalty that usually pollutes this discussion.

SQL Databases: Still the Default

Relational databases (PostgreSQL, MySQL, SQL Server) remain the right starting point for most applications. The reasons have not changed: structured data with relationships is the most common data pattern, SQL is the most widely known query language, and the tooling ecosystem is the deepest.

What has changed: modern SQL databases have closed the gaps that drove the original NoSQL movement.

Horizontal scaling. PlanetScale (Vitess), CockroachDB, YugabyteDB, and Neon offer horizontal scaling for PostgreSQL and MySQL-compatible databases. You no longer need to abandon SQL to handle large datasets or high throughput.

JSON support. PostgreSQL’s JSONB and MySQL’s JSON columns let you store semi-structured data alongside relational data. For the common pattern of “mostly structured data with some flexible fields,” this eliminates the need for a separate document store.

Serverless. Neon, PlanetScale, and Turso offer serverless SQL databases that scale to zero and start in milliseconds. The operational overhead argument against SQL databases is weaker than it has been in a decade.

When SQL fits: structured data with clear relationships, transactional requirements, complex queries (joins, aggregations, window functions), regulatory compliance requirements, and applications where data integrity is more important than write throughput.

When SQL does not fit: massive write throughput (millions of writes per second), data with no clear schema, or workloads where eventual consistency is acceptable and horizontal scaling is essential from day one.

Document Databases: Specific Problems, Not General Purpose

Document databases (MongoDB, DynamoDB, Firestore, CouchDB) store data as self-contained documents — typically JSON. Each document can have a different structure, and there is no enforced schema.

The original pitch was “schema flexibility” and “developer productivity.” The reality turned out to be more nuanced. Schema flexibility means the application layer must handle schema validation, migration, and consistency — work that the database used to do for you. “Developer productivity” meant “faster to start, harder to maintain.”

Where document databases genuinely excel:

  • Content management systems where each content type has a different structure and the schema evolves frequently
  • Event logging and time-series data where each event carries different attributes
  • User profiles and preferences with highly variable fields
  • DynamoDB specifically for applications on AWS that need single-digit millisecond latency at any scale, with predictable capacity pricing

Where they struggle:

  • Data with many relationships (you end up denormalizing heavily or making multiple queries)
  • Complex analytical queries (document databases optimize for key-based access, not arbitrary queries)
  • Applications where data consistency across multiple documents matters (multi-document transactions exist but add latency and complexity)

The most common mistake: choosing MongoDB because “SQL is old” and then spending months building application-level join logic, consistency checks, and migration tooling that PostgreSQL provides out of the box.

Graph Databases: The Relationship Specialists

Graph databases (Neo4j, Amazon Neptune, TigerGraph) store data as nodes and edges with properties. They are optimized for traversing relationships — finding paths, computing centrality, matching patterns across connected data.

Where graph databases are genuinely the best tool:

  • Social networks and recommendation engines — “friends of friends who liked X” is a one-line Cypher query and a nightmare JOIN in SQL
  • Fraud detection — identifying suspicious patterns in transaction graphs (circular money flows, shared identities)
  • Knowledge graphs — representing and querying complex domain knowledge with many entity types and relationship types
  • Network topology — mapping infrastructure dependencies, analyzing impact of outages
  • Access control — modeling complex permission hierarchies with inheritance and delegation

Where they are the wrong choice:

  • CRUD applications with simple relationships (a foreign key is simpler than a graph edge)
  • Analytical workloads (graph databases are not optimized for aggregations over large datasets)
  • Applications where most queries access individual records by key (use a relational or document database)

The key insight: graph databases do not replace relational databases. They supplement them for the specific subset of queries where relationship traversal dominates. Many production systems use PostgreSQL for primary data storage and Neo4j for relationship-intensive queries, with data synced between them.

The Decision Framework

  1. What does the data look like? Structured with clear relationships → SQL. Variable structure per record → document. Relationship-heavy with traversal queries → graph.

  2. What queries will you run? JOINs, aggregations, window functions → SQL. Key-based lookups with flexible schemas → document. Path finding, pattern matching across connections → graph.

  3. What are the consistency requirements? Strong consistency with transactions → SQL. Eventual consistency acceptable → document (depending on product). Complex relationship consistency → graph + SQL combination.

  4. What is the team’s experience? The database your team knows well is the database that will be operated well. A poorly operated MongoDB instance loses to a well-operated PostgreSQL instance every time.

For blob storage patterns, remember that the choice of primary database does not affect how you handle binary data — the pointer-in-DB, bytes-in-object-store pattern works with any database category.

The Honest Recommendation

If you are starting a new project and unsure: use PostgreSQL. It handles relational data, JSON data, full-text search, and time-series data adequately to well. You can add a specialized database later if a specific workload demands it. Starting with the most versatile option and specializing when needed is more pragmatic than choosing the “perfect” database upfront and discovering its limitations later.