Chapter 1. A case for a Neo4j database
Figure 1.1. Users and their friends represented as a graph data structure
Figure 1.2. SQL diagram of tables representing user and friend data
Chapter 2. Data modeling in Neo4j
Figure 2.1. Users and groups in an RDBMS with a join table
Figure 2.2. A person belongs to a group.
Figure 2.3. Three people in two groups
Figure 2.4. The entities in an access control system
Figure 2.5. Relationships between entities in the access control system
Figure 2.6. The access control model extended to support subgroups
Figure 2.7. A User with some properties
Figure 2.8. The user with some nodes converted to properties
Figure 2.9. Two users with different relationships to the same address
Figure 2.10. Two users with differently qualified relationships to the same address
Figure 2.12. A User with additional properties stored in a related UserEx node
Figure 2.14. Two underground stations, with connections on two different lines
Figure 2.15. A simple model showing band members and a recorded album
Figure 2.16. A more complex model showing two different lineups of the same band
Chapter 3. Starting development with Neo4j
Figure 3.1. Users in a social network represented as boxes
Figure 3.2. Simple social network graph with users connected as friends
Figure 3.3. Richer model with a name property assigned to each user
Figure 3.4. Introducing movies to the model
Figure 3.5. Introducing type properties to differentiate between User and Movie elements
Figure 3.6. Complete model of a movie-lover’s social network
Figure 3.7. Graph with only node entities
Figure 3.8. Simple social network graph with users connected as friends
Figure 3.9. Rich property graph representing the social network
Figure 3.10. Graph with nodes representing users and movies
Figure 3.11. Nodes using the type property strategy
Figure 3.12. Complete model of a movie-lovers’ social network
Chapter 4. The power of traversals
Figure 4.1. The selected user and the movies he’s seen are marked with a bold border.
Figure 4.2. Nodes and relationships to follow to find movies that John’s friends like
Chapter 5. Indexing the data
Figure 5.1. Index pointing to user nodes as values, using the email property as a key
Figure 5.2. Looking up a user node from the index by using the email property
Figure 5.5. Performance of node lookup using index compared to iterating through all nodes
Figure 5.6. Average time for storing user node with and without indexing
Chapter 6. Cypher: Neo4j query language
Figure 6.1. A social network graph to be queried
Figure 6.2. The Neo4j Shell ready to accept commands
Figure 6.3. Cypher is executed in the Neo4j Shell natively, resulting in tabular output.
Figure 6.4. Homepage of the Neo4j Web Admin Console in the browser
Figure 6.5. Executing a Cypher query inside the Web Admin Console
Chapter 7. Transactions
Chapter 8. Traversals in depth
Figure 8.1. Simple graph with nine nodes and eight relationships
Figure 8.2. Walking the graph using depth-first ordering
Figure 8.3. Breadthfirst traversal of the sample graph
Figure 8.4. A social network of users and movies they like
Figure 8.5. A simple social network graph
Figure 8.6. Bidirectional traversal used to find the path between two nodes
Chapter 9. Spring Data Neo4j
Figure 9.1. Overview of where SDN fits within your broader application
Figure 9.2. Conceptual overview of the movie-lovers’ social network, with referrals
Figure 9.3. Social network model with nodes highlighted
Figure 9.5. A social network model with the relationship references between nodes highlighted
Figure 9.6. Overview of SDN repository classes involved in accessing User node entity
Figure 9.7. Overview of the simple mapping logic
Chapter 10. Neo4j: embedded versus server mode
Figure 10.1. Overview of Neo4j usage modes and the main integration options for clients
Figure 10.4. A typical Neo4j server setup with client access via the standard REST API
Figure 10.5. Server-based deployment approach using remote REST client libraries
Figure 10.6. Accessing Neo4j via server plugins and unmanaged extensions
Chapter 11. Neo4j in production
Figure 11.1. High-level overview of the Neo4j architecture
Figure 11.2. Neo4j’s use of RAM for caching
Figure 11.3. Recap of where transaction logs fit into the overall Neo4j architecture
Figure 11.4. Programmatic API stack
Figure 11.5. Sample Neo4j HA cluster setup with 1 master and 2 slaves
Figure 11.6. Web Admin Console view of HA setup from machine01’s perspective
Figure 11.7. Web Admin Console view of HA setup from machine02’s perspective
Figure 11.8. Sequence of events when a write request is sent to the master instance
Figure 11.9. Sequence of events when a write request is sent to a slave instance
Figure 11.11. Example backup scenario for a single server setup
Appendix A. Installing Neo4j server
Figure A.1. The Neo4j browser splash page
Figure A.2. The Neo4j browser splash page with expanded sidebar
Figure A.3. The Neo4j browser’s graphical visualization of nodes in the system
Appendix B. Setting up and running the sample code
18.191.253.62