data-infra

NoSQL

NoSQL is an umbrella term for database systems that don't use the traditional relational (table-and-row, SQL-queried) model, generally trading some of the strict schema enforcement and join capabilities of relational databases for schema flexibility, easier horizontal scaling, and — depending on the specific system — different performance characteristics for specific access patterns. It splits into several distinct families that get lumped together under one label but behave very differently: document stores (MongoDB, Firestore — store semi-structured JSON-like documents, good fit for nested/variable-shape data); key-value stores (Redis, DynamoDB — extremely fast simple lookups by key, minimal query flexibility); wide-column stores (Cassandra, HBase — built for massive write throughput and horizontal scale across many nodes); and graph databases (Neo4j — optimized for traversing relationships, like "friends of friends," efficiently). Why it matters for AI/SaaS builders: NoSQL databases show up in AI products specifically where data genuinely doesn't fit a fixed relational schema well — storing arbitrary, evolving LLM tool-call payloads, flexible per-customer configuration objects, or chat conversation history where message structure varies — or where a specific access pattern (extremely high write throughput, simple key-based lookups at massive scale) outweighs the benefits of joins and strict schema. It's worth noting that vector databases are, technically, a specialized form of NoSQL database, and modern "multi-model" databases (MongoDB with vector search, Postgres with `jsonb` and pgvector) have blurred the historical SQL-vs-NoSQL line considerably — a team no longer strictly has to choose one paradigm exclusively. How it works: most NoSQL systems relax one or more of the ACID guarantees relational databases enforce, typically favoring "eventual consistency" (a write is guaranteed to propagate to all replicas/nodes eventually, but not necessarily instantly) in exchange for higher availability and easier horizontal scaling across many commodity servers — a trade-off formalized by the CAP theorem, which states a distributed system can only fully guarantee two of Consistency, Availability, and Partition tolerance at once. Worked example: an AI chatbot SaaS stores conversation transcripts — where message structure varies (some messages are plain text, some contain tool calls, some contain generated images with metadata) — in MongoDB as flexible JSON documents rather than forcing every possible message shape into a rigid set of relational columns, while keeping billing, users, and subscriptions in Postgres where ACID guarantees and structured joins genuinely matter. This kind of deliberate "polyglot persistence" — picking a different database technology per data type based on its actual access pattern, rather than forcing every kind of data into one system for the sake of operational simplicity — is increasingly the norm for AI products specifically, since so much AI-adjacent data (chat history, embeddings, tool-call payloads) genuinely doesn't fit the relational model as naturally as a subscription record does.

Related terms

More Data & Infra terms