You are previewing Graph Databases.

Graph Databases

Cover of Graph Databases by Ian Robinson... Published by O'Reilly Media, Inc.
  1. Special Upgrade Offer
  2. Foreword
    1. Graphs Are Everywhere, or the Birth of Graph Databases as We Know Them
  3. Preface
    1. About This Book
    2. Conventions Used in This Book
    3. Using Code Examples
    4. Safari® Books Online
    5. How to Contact Us
    6. Acknowledgments
  4. 1. Introduction
    1. What Is a Graph?
    2. A High-Level View of the Graph Space
      1. Graph Databases
      2. Graph Compute Engines
    3. The Power of Graph Databases
      1. Performance
      2. Flexibility
      3. Agility
    4. Summary
  5. 2. Options for Storing Connected Data
    1. Relational Databases Lack Relationships
    2. NOSQL Databases Also Lack Relationships
    3. Graph Databases Embrace Relationships
    4. Summary
  6. 3. Data Modeling with Graphs
    1. Models and Goals
    2. The Property Graph Model
    3. Querying Graphs: An Introduction to Cypher
      1. Cypher Philosophy
      2. START
      3. MATCH
      4. RETURN
      5. Other Cypher Clauses
    4. A Comparison of Relational and Graph Modeling
      1. Relational Modeling in a Systems Management Domain
      2. Graph Modeling in a Systems Management Domain
      3. Testing the Model
    5. Cross-Domain Models
      1. Creating the Shakespeare Graph
      2. Beginning a Query
      3. Declaring Information Patterns to Find
      4. Constraining Matches
      5. Processing Results
      6. Query Chaining
    6. Common Modeling Pitfalls
      1. Email Provenance Problem Domain
      2. A Sensible First Iteration?
      3. Second Time’s the Charm
      4. Evolving the Domain
    7. Avoiding Anti-Patterns
    8. Summary
  7. 4. Building a Graph Database Application
    1. Data Modeling
      1. Describe the Model in Terms of the Application’s Needs
      2. Nodes for Things, Relationships for Structure
      3. Fine-Grained versus Generic Relationships
      4. Model Facts as Nodes
      5. Represent Complex Value Types as Nodes
      6. Time
      7. Iterative and Incremental Development
    2. Application Architecture
      1. Embedded Versus Server
      2. Clustering
      3. Load Balancing
    3. Testing
      1. Test-Driven Data Model Development
      2. Performance Testing
    4. Capacity Planning
      1. Optimization Criteria
      2. Performance
      3. Redundancy
      4. Load
    5. Summary
  8. 5. Graphs in the Real World
    1. Why Organizations Choose Graph Databases
    2. Common Use Cases
      1. Social
      2. Recommendations
      3. Geo
      4. Master Data Management
      5. Network and Data Center Management
      6. Authorization and Access Control (Communications)
    3. Real-World Examples
      1. Social Recommendations (Professional Social Network)
      2. Authorization and Access Control
      3. Geo (Logistics)
    4. Summary
  9. 6. Graph Database Internals
    1. Native Graph Processing
    2. Native Graph Storage
    3. Programmatic APIs
      1. Kernel API
      2. Core (or “Beans”) API
      3. Traversal API
    4. Nonfunctional Characteristics
      1. Transactions
      2. Recoverability
      3. Availability
      4. Scale
    5. Summary
  10. 7. Predictive Analysis with Graph Theory
    1. Depth- and Breadth-First Search
    2. Path-Finding with Dijkstra’s Algorithm
    3. The A* Algorithm
    4. Graph Theory and Predictive Modeling
      1. Triadic Closures
      2. Structural Balance
    5. Local Bridges
    6. Summary
  11. A. NOSQL Overview
    1. The Rise of NOSQL
    2. ACID versus BASE
    3. The NOSQL Quadrants
    4. Document Stores
    5. Key-Value Stores
    6. Column Family
    7. Query versus Processing in Aggregate Stores
    8. Graph Databases
      1. Property Graphs
      2. Hypergraphs
      3. Triples
  12. Index
  13. About the Authors
  14. Colophon
  15. Special Upgrade Offer
  16. Copyright

Chapter 5. Graphs in the Real World

In this chapter we look at some of the common real-world use cases for graph databases and identify the reasons why organizations choose to use a graph database rather than a relational or other NOSQL store. The bulk of the chapter comprises three in-depth use cases, with details of the relevant data models and queries. Each of these examples has been drawn from a real-world production system; the names, however, have been changed, and the technical details simplified where necessary to hide any accidental complexity, and thereby highlight key design points.

Why Organizations Choose Graph Databases

Throughout this book, we’ve sung the praises of the graph data model, its power and flexibility, and its innate expressiveness. When it comes to applying a graph database to a real-world problem, with real-world technical and business constraints, organizations choose graph databases for the following reasons:

“Minutes to milliseconds” performance
Query performance and responsiveness are top of many organizations’ concerns with regard to their data platforms. Online transactional systems, large web applications in particular, must respond to end users in milliseconds if they are to be successful. In the relational world, as an application’s dataset size grows, join pains begin to manifest themselves, and performance deteriorates. Using index-free adjacency, a graph database turns complex joins into fast graph traversals, thereby maintaining millisecond ...

The best content for your career. Discover unlimited learning on demand for around $1/day.