售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Neo4j Graph Data Modeling
Table of Contents
Neo4j Graph Data Modeling
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
eBooks, discount offers, and more
Questions
1. Graphs Are Everywhere
Graphs in mathematics
The property graph model
Storage – native graph storage versus non-native graph storage
Reasons to use graph databases
What to use a graph database for
Choosing Neo4j for exploring graph databases
The structure of the book
Summary
2. Modeling Flights and Cities
Graphs are more than social
Designing a system to get a travel itinerary
Introduction to modeling flights and cities
Identifying the entities
Introduction to modeling nodes and relationships
Using Cypher to operate on Neo4j
Creating cities in Neo4j
Indices
Adding flights to Neo4j
Traversing relationships
Summary
3. Formulating an Itinerary
Creating an itinerary from flights and cities
Information and paths
Using Cypher to find a path
Business logic should lie in code
Summary
4. Modeling Bookings and Users
Building a data model for booking flights
A simple model of the bookings ecosystem
Modeling bookings in an RDBMS
Creating bookings and users in Neo4j
Creating users
Creating bookings in Neo4j
Queries to find journeys and bookings
Finding all journeys of a user
Queries to find the booking history of a user
Upcoming journeys of a user
Summary
5. Refactoring the Data Model
Capturing information about hotels at airports
Modeling airports and hotels
Extracting airport information from flights
Breaking airports out as a node
Connecting flights to airports
Delinking flights and cities
Querying the refactored data model
Reasons for not migrating using a single query
Adding hotels to airports
Fetching hotels
Summary
6. Modeling Communication Chains
Capturing traveler reviews for hotels
A model for reviews and comments
Adding reviews to Neo4j
Listing reviews for a hotel
Using reviews to find the average rating of a hotel
Adding comments to Neo4j
Considerations for modeling temporal data as chains
Summary
7. Modeling Access Control
Controlling access for content change
Modeling hierarchies
Modeling geographical regions
Adding countries and regions to Neo4j
Modeling hotel chains
Adding hotel chains to Neo4j
Modeling access control groups and employees
Adding access groups to Neo4j
Adding employees to Neo4j
Querying the data model to find what is accessible to an employee
Summary
8. Recommendations and Analysis of Historical Data
Recommending cities to travelers
Modeling categories
Creating categories in Neo4j
Cities and categories
Recommending cities based on previous travels
Recommending cities on the basis of other travelers
Recommending hotels to travelers
Recommending hotels from the same chains
Recommending hotels visited by similar travelers
Recommending hotels that match a price range
Improving recommendations
Analysis of the historical data
Querying to discover patterns
Summary
9. Wrapping Up
There is no correct model
Further reading and exploration
What to watch out for while using Neo4j
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜