Spanner Graph overview Stay organized with collections Save and categorize content based on your preferences.
Note: This feature is available with the Spanner Enterprise edition and Enterprise Plus edition. For more information, see theSpanner editions overview.
Spanner Graph combines graph database capabilities withSpanner scalability, availability, and consistency.Spanner Graph supports an ISO Graph Query Language (GQL)-compatible graphquery interface and enables interoperability between relational and graphmodels.
Spanner Graph lets you map tables to property graphs using declarativeschema without data migration, bringing graphs to tabular datasets. You can alsolate-bind data model choices per query, which helps you choose the right toolfor your workflows.
To get started with Spanner Graph, seeSet up and query Spanner Graph and theSpanner Graph codelab.
Benefits of Spanner Graph databases
Graphs provide a natural mechanism for representing relationships in data.Example use cases for graph databases include fraud detection, recommendations,cybersecurity, community detection, knowledge graphs, customer 360, datacataloging, and lineage tracking.
Traditionally, applications represent this type of graph data as tables in arelational database, using multiple joins to traverse the graph. Expressinggraph traversal logic in SQL creates complex queries that are difficult towrite, maintain, and debug.
The graph interface in Spanner Graph lets you navigate relationships andidentify patterns in the graph in intuitive ways. In addition, Spanner Graphprovides graph-optimized storage and query enhancements suited for onlineanalytical and transactional graph workloads, all built intoSpanner's core capabilities.
This approach makes Spanner Graph the ideal solution for evenmission-critical graph applications. In particular, Spanner'stransparent sharding scales elastically to very large datasets. It usesmassively parallel processing without user intervention.
Use cases for Spanner Graph
You can use Spanner Graph to build many types of online Graph applications,including the following:
Detect financial fraud: Analyze complex relationships among users,accounts, and transactions to identify suspicious patterns and anomalies,such as money laundering and unusual connections between entities, which canbe difficult to detect using relational databases.
Track customer relationships: Track customer relationships, preferences,and purchase histories. Gain a holistic understanding of each customer,enable personalized recommendations, targeted marketing campaigns, andimproved customer service experiences.
Capture social networks: Capture user activities and interactions, anduse graph pattern matching for friend recommendations and content discovery.
Manage manufacturing and supply chains: Model parts, suppliers, orders,availability, and defects in the graph to analyze impact, roll up costs, andcheck compliance.
Analyze healthcare data: Capture patient relationships, conditions,diagnoses, and treatments to facilitate patient similarity analysis andtreatment planning.
Manage supply chains: Given a shipment routing plan, evaluate routesegments to identify violations of segment rules.
Key capabilities
Spanner Graph is a multi-model database that integrates graph, relational,search, and AI capabilities. It offers high performance and scalability,delivering the following:
Native graph experience: The ISO GQL interface offers a familiar,purpose-built graph experience that's based on open standards.
Build GraphRAG workflow applications: Spanner Graph integrates withLangChain to help you build GraphRAG applications. While conventionalretrieval-augmented generation (RAG) uses vector search to provide contextto a large language model (LLM), it can't use the implicit relationships inyour data. GraphRAG overcomes this limitation by building a graph from yourdata to capture these complex relationships. It then combines graph search(for relationship-based context) with vector search (for semanticsimilarity), generating more accurate, relevant, and complete answers thanusing either method alone. For more information, seeBuild LLM-powered applications using LangChain.To learn how you can use Spanner Graph withVertex AI to build infrastructure for a GraphRAG-capable generativeAI application, seeGraphRAG infrastructure for generative AI using Vertex AI and Spanner Graph.
Unified relational and graph: Full interoperability between GQL and SQLbreaks down data silos. This lets you choose the optimal tool for each usecase, without any operational overheads to extract, transform, and load(ETL).
Built-in search capabilities: Rich vector and full-text searchcapabilities are integrated with graph, letting you use semantic meaning andkeywords in graph analysis.
AI-powered insights: Deep integration with Vertex AI unlocks asuite of AI models directly in Spanner Graph, helping you accelerateyour AI workflows.
Scalability, availability, and consistency: Spanner'sestablished scalability, availability, and consistency provide a solidfoundation.
What's next
- Get started with theSpanner Graph codelab.
- Set up and querySpanner Graph.
- Learn about theSpanner Graph schema.
- Learn how to create, update, or drop aSpanner Graph schema.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.