graph_databases.pdf

(10567 KB) Pobierz
Graph
Databases
NEW OPPORTUNITIES FOR CONNECTED DATA
Ian Robinson,
Jim Webber & Emil Eifrem
2n
d
Ed
iti
on
Graph Databases
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.
Graph analysis is possibly
the single most effective
competitive differentiator
for organizations pursuing
data-driven operations
and decisions.
IT Market Clock for Database
Management Systems, 2014
—Gartner
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
Ian Robinson
works on research and development for future versions of the Neo4j
graph database and previously served as Neo’s Director of Customer Success.
Jim Webber,
Neo Technology’s Chief Scientist, is a distributed systems specialist
working on very large-scale graph data technology.
Emil Eifrem
is CEO of Neo Technology and co-founder of the open source Neo4j
graph database project.
DATA /DATA SCIENCE
Twitter: @oreillymedia
facebook.com/oreilly
CAN $45.99
US $39.99
ISBN: 978-1-491-93089-2
SECOND EDITION
Graph Databases
Ian Robinson, Jim Webber & Emil Eifrem
Boston
Graph Databases
by Ian Robinson, Jim Webber, and Emil Eifrem
Copyright © 2015 Neo Technology, Inc. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are
also available for most titles (http://safaribooksonline.com). For more information, contact our corporate/
institutional sales department: 800-998-9938 or
corporate@oreilly.com.
Editor:
Marie Beaugureau
Production Editor:
Kristen Brown
Proofreader:
Christina Edwards
Indexer:
WordCo Indexing Services
June 2013:
June 2015:
First Edition
Second Edition
Interior Designer:
David Futato
Cover Designer:
Ellie Volckhausen
Illustrator:
Rebecca Demarest
Revision History for the Second Edition
2015-06-09:
First Release
See
http://oreilly.com/catalog/errata.csp?isbn=9781491930892
for release details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc.
Graph Databases,
the cover image of an
European octopus, and related trade dress are trademarks of O’Reilly Media, Inc.
While the publisher and the authors have used good faith efforts to ensure that the information and
instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility
for errors or omissions, including without limitation responsibility for damages resulting from the use of
or reliance on this work. Use of the information and instructions contained in this work is at your own
risk. If any code samples or other technology this work contains or describes is subject to open source
licenses or the intellectual property rights of others, it is your responsibility to ensure that your use
thereof complies with such licenses and/or rights.
978-1-491-93089-2
[LSI]
Table of Contents
Foreword. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
What Is a Graph?
A High-Level View of the Graph Space
Graph Databases
Graph Compute Engines
The Power of Graph Databases
Performance
Flexibility
Agility
Summary
1
4
5
7
8
8
9
9
10
11
15
18
24
25
26
27
28
30
30
iii
2. Options for Storing Connected Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Relational Databases Lack Relationships
NOSQL Databases Also Lack Relationships
Graph Databases Embrace Relationships
Summary
3. Data Modeling with Graphs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Models and Goals
The Labeled Property Graph Model
Querying Graphs: An Introduction to Cypher
Cypher Philosophy
MATCH
RETURN
Zgłoś jeśli naruszono regulamin