Graph Databases, 2nd Edition

Book description

Discover how graph databases can help you manage and query highly connected data. With this practical book, you’ll learn how to design and implement a graph database that brings the power of graphs to bear on a broad range of problem domains. Whether you want to speed up your response to user queries or build a database that can adapt as your business evolves, this book shows you how to apply the schema-free graph model to real-world problems.

This second edition includes new code samples and diagrams, using the latest Neo4j syntax, as well as information on new functionality. Learn how different organizations are using graph databases to outperform their competitors. With this book’s data modeling, query, and code examples, you’ll quickly be able to implement your own solution.

  • Model data with the Cypher query language and property graph model
  • Learn best practices and common pitfalls when modeling with graphs
  • Plan and implement a graph database solution in test-driven fashion
  • Explore real-world examples to learn how and why organizations use a graph database
  • Understand common patterns and components of graph database architecture
  • Use analytical techniques and algorithms to mine graph database information

Publisher resources

View/Submit Errata

Table of contents

  1. Foreword
    1. Graphs Are Eating The World, And There’s No Going Back
  2. Preface
    1. About the Second Edition
    2. About This Book
    3. Conventions Used in This Book
    4. Using Code Examples
    5. Safari® Books Online
    6. How to Contact Us
    7. Acknowledgments
  3. 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
  4. 2. Options for Storing Connected Data
    1. Relational Databases Lack Relationships
    2. NOSQL Databases Also Lack Relationships
    3. Graph Databases Embrace Relationships
    4. Summary
  5. 3. Data Modeling with Graphs
    1. Models and Goals
    2. The Labeled Property Graph Model
    3. Querying Graphs: An Introduction to Cypher
      1. Cypher Philosophy
      2. MATCH
      3. RETURN
      4. 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. Identifying Nodes and Relationships
    8. Avoiding Anti-Patterns
    9. Summary
  6. 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. Importing and Bulk Loading Data
      1. Initial Import
      2. Batch Import
    6. Summary
  7. 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. Geospatial and Logistics
    4. Summary
  8. 6. Graph Database Internals
    1. Native Graph Processing
    2. Native Graph Storage
    3. Programmatic APIs
      1. Kernel API
      2. Core API
      3. Traversal Framework
    4. Nonfunctional Characteristics
      1. Transactions
      2. Recoverability
      3. Availability
      4. Scale
    5. Summary
  9. 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
  10. 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
  11. Index

Product information

  • Title: Graph Databases, 2nd Edition
  • Author(s): Ian Robinson, Jim Webber, Emil Eifrem
  • Release date: June 2015
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781491930892