Graph Database
What is Graph Database?
A graph database is a database that stores data as nodes and the relationships between them, making it efficient to query connected data, such as networks, dependencies and hierarchies, by following those relationships directly.
Updated November 2026 · 2 min read
A graph database is built for questions about connections, such as networks, dependencies, hierarchies and paths: it stores each item as a node and each link between items as a relationship, so queries follow relationships directly instead of reconstructing them. In a relational database, connections are calculated at query time by joining tables, which gets slow and complicated as the number of hops grows. In a graph database, relationships are stored as first-class data, so traversing many hops stays fast.
Graph databases became widely used in the 2010s, with Neo4j, first released in 2007, among the best known. In 2024, the International Organization for Standardization published GQL (ISO/IEC 39075) as a standard query language for property graphs, a sign of the technology's maturity. Major cloud providers also offer managed graph databases, such as Amazon Neptune.
Graph database vs. relational database
| Relational database | Graph database | |
|---|---|---|
| Data model | Tables, rows, foreign keys | Nodes, relationships, properties |
| Connections | Computed with joins | Stored directly |
| Multi-hop queries | Slow and complex as hops increase | Fast and natural |
| Schema changes | Often require migrations | Flexible |
| Best for | Transactions, aggregations, reporting | Networks, dependencies, recommendations, paths |
Types of graph databases
- Property graph databases: nodes and relationships carry properties, queried with Cypher or GQL.
- RDF triple stores: store subject-predicate-object triples, queried with SPARQL, with strong support for formal ontologies.
- Multi-model databases: support graph alongside documents or other models.
Graph database use cases
- Fraud and anti-money-laundering networks.
- Recommendations ("customers who bought this also bought").
- IT and application dependency mapping. See application dependency mapping.
- Supply chain networks.
- Identity and access: who can access what, through which groups.
- Storing a knowledge graph.
Graph database example
Consider a hypothetical telecom provider that needs to know which enterprise customers would lose service if a particular network switch fails. In its relational inventory system, the answer requires recursively joining equipment, circuits, services and contracts, and the query takes minutes. Modeled in a graph database, the same question is a short traversal from the switch through connected equipment to services and customers, and returns in under a second, fast enough for operations staff to use during an outage.
When not to use a graph database
Graph databases are not a replacement for relational databases in general. For high-volume transactions, simple lookups and aggregate reporting, relational databases and data warehouses usually perform better and are better understood by most teams.
Frequently asked questions
What is the difference between a graph database and a relational database?
A relational database stores data in tables and calculates connections at query time with joins, which becomes slow and complex as the number of hops grows. A graph database stores relationships directly as data, so multi-hop queries stay fast. Relational databases remain the better choice for high-volume transactions, simple lookups and aggregate reporting.
What query languages do graph databases use?
Property graph databases are typically queried with Cypher or GQL, which ISO published in 2024 as a standard query language for property graphs, ISO/IEC 39075. RDF triple stores, which hold subject-predicate-object triples, use SPARQL and offer strong support for formal ontologies. Multi-model databases support graph queries alongside documents or other data models.
When is a graph database the wrong choice?
A graph database is the wrong choice when the workload is mostly high-volume transactions, simple lookups or aggregate reporting. Relational databases and data warehouses usually perform better for those tasks and are better understood by most teams. Graph databases earn their place when questions depend on following many relationships, such as fraud networks, dependencies or paths.
Related terms
Ontology
A formal model of a domain's concepts and how they relate.
Knowledge Graph
A network of entities and relationships that links information by meaning.
Entity Resolution
Matching records that refer to the same real-world person or thing.
Knowledge Management
Capturing and sharing what an organization knows so it can be reused.