Graph Database
Definition
Database designed for storing and querying data with complex relationships. Like having a map that shows how everything is connected to everything else.
Use Cases
- Walmart: Product recommendations and relationship-driven discovery (e.g., customers-who-bought-this-also-bought) — Walmart has described using graph technology to model relationships among customers, products, and interactions to improve recommendation and discovery experiences. (Improved ability to traverse complex relationships for personalization and discovery use cases, supporting more relevant recommendations.)
- Airbnb: Trust, safety, and fraud detection by linking accounts, devices, payment instruments, and behaviors — Airbnb has discussed using graph-based approaches to connect entities (users, listings, devices, payments) and analyze relationship patterns that indicate abuse or fraud. (Faster identification of suspicious networks and improved enforcement by analyzing connected signals rather than isolated events.)
- LinkedIn: People-you-may-know and professional network insights — LinkedIn’s core product is built around a social/professional graph; they model member-to-member and member-to-entity relationships to power connection recommendations and feed relevance. (More accurate connection suggestions and network-based personalization by leveraging multi-hop relationship queries.)
Provider Equivalents
- AWS: Amazon Neptune
- Azure: Azure Cosmos DB (Gremlin API)
- OCI: Oracle Autonomous Database (Property Graph) / Oracle Graph Server and Client
Frequently Asked Questions
- What's the difference between a graph database and a relational database?
- A relational database stores data in tables and typically joins tables to connect related records. A graph database stores data as nodes (things) and edges (relationships), making it faster and simpler to query many-to-many relationships and multi-hop connections (e.g., "friends of friends" or "paths" between entities). Relational databases can model relationships too, but complex joins can become harder to write and slower at scale for highly connected data.
- When should I use a graph database?
- Use a graph database when relationships are central to your application and you need to traverse connections quickly. Common cases include social networks, recommendation engines, fraud rings and identity resolution, network/IT topology, knowledge graphs, and supply-chain dependency mapping. If your queries are mostly simple lookups, aggregations, or reporting on structured records, a relational or key-value database may be a better fit.
- How much does a graph database cost?
- Cost depends on whether you use a managed cloud service or self-host. Managed services typically charge for compute (instance size/number of nodes), storage, I/O, backups, and data transfer. Costs rise with larger graphs, higher query throughput, and high availability (multi-zone/replicas). Self-hosting can reduce service fees but adds operational costs (engineering time, scaling, patching, monitoring). Always estimate based on expected graph size, read/write rates, and required uptime.
Category: data
Difficulty: advanced
See Also