Neo4j

Create a Competitive Analysis / SWOT to position your company in the market

Get Started. It's Free
or sign up with your email address
Rocket clouds
Neo4j by Mind Map: Neo4j

1. Introduction

1.1. NOSQL Categories

1.1.1. KeyValue store

1.1.1.1. Amazon Dynamo db

1.1.1.2. Redis

1.1.2. Column table

1.1.2.1. HBase

1.1.2.2. Cassandra

1.1.3. Document

1.1.3.1. MongoDB

1.1.3.2. CouchDB

1.1.4. Graph databases

1.1.4.1. Neo4j

1.1.4.2. AllegroGraph

1.1.4.3. Sones

1.2. Scalability and complexity

1.3. Characteristics

1.4. When to use

1.5. Why Graph databases

1.6. Use cases

1.7. Performance

1.8. Difference with RDBMS

1.8.1. relationship part of data whereas it is part of schema in rdbms

1.9. Terms

1.9.1. Nodes

1.9.2. Relationship

1.9.3. Property

1.9.4. Path

2. Overview

2.1. What is Neo4j

2.1.1. Graph db

2.1.2. Node connected by relationship

2.1.3. key value pairs on nodes and relationships

2.1.4. written in Java

2.1.5. schema free

2.1.6. Fully transactional (ACID)

2.1.7. integrated indexing

2.1.8. lot of language bindings - java, scala etc.,

2.2. Cypher Query language

2.2.1. describe what you want, not how

2.2.2. based on pattern matching

2.2.3. Traversal API/ DSL

2.2.4. Graph algorithm library

2.2.4.1. Cheapest path

2.2.4.2. Shortest path

2.3. Server

2.3.1. Embeddable or standalone server

2.4. Operations

2.4.1. Creating new nodes

2.4.2. Setting attributes

2.4.3. Setting relationship between nodes

2.4.4. Traversal

3. Spring data neo4j

3.1. Advantages of apring

3.1.1. POJO centric app design

3.1.2. IOC / dependency injection

3.1.3. transaction management

3.1.4. Template programming model

3.1.5. Annotation based

3.1.6. Lots of powerful and easy to use libraries

3.1.7. Spring data project

3.2. Features

3.3. Tags

3.3.1. @NodeEntity

3.3.1.1. Represents a node

3.3.1.2. Fields saved as properties on node

3.3.2. @RelationshipEntity

3.3.2.1. represents a relationship

3.3.2.2. fields are saved as properties on relationsip

3.3.2.3. special fields for start and end nodes

3.3.3. @Indexed

3.3.3.1. Becomes searchable

3.3.4. @Query

3.4. neo4jtemplate

3.5. steps

3.6. Getting started

3.6.1. Setup

3.6.1.1. Maven entries

3.6.1.1.1. <dependencies> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-neo4j</artifactId> <version>1.0.0.RELEASE</version> </dependency> </dependencies> <repositories> <repository> <id>spring-maven-snapshot</id> <snapshots><enabled>true</enabled></snapshots> <name>Springframework Maven MILESTONE Repository</name> <url>http://maven.springframework.org/milestone</url> </repository> </repositories>

3.6.1.2. Hook aspectJ into maven plugin

3.6.1.2.1. <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>aspectj-maven-plugin</artifactId> <version>1.0</version> <configuration> <outxml>true</outxml> <aspectLibraries> <aspectLibrary> <groupId>org.springframework</groupId> <artifactId>spring-aspects</artifactId> </aspectLibrary> <aspectLibrary> <groupId>org.springframework.data</groupId> <artifactId>spring-data-neo4j</artifactId> </aspectLibrary> </aspectLibraries> <source>1.6</source> <target>1.6</target> </configuration> <executions> <execution> <goals> <goal>compile</goal> <goal>test-compile</goal> </goals> </execution> </executions> <dependencies> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjrt</artifactId> <version>1.6.11.RELEASE</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjtools</artifactId> <version>1.6.11.RELEASE</version> </dependency> </dependencies> </plugin>

3.6.1.3. Spring configuration

3.6.1.3.1. <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:datagraph="http://www.springframework.org/schema/data/graph" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/data/graph http://www.springframework.org/schema/data/graph/datagraph-1.0.xsd "> <context:annotation-config/> <datagraph:config storeDirectory="target/config-test"/> </beans>

3.6.2. Creating entities

3.6.2.1. @NodeEntity public class World { @Indexed private String name; @Indexed( indexName = "moons" ) private int moons; @RelatedTo( type = "REACHABLE_BY_ROCKET", direction = Direction.BOTH, elementClass = World.class ) private Set<World> reachableByRocket; public World() {} public World(String name, int moons) { this.name = name; this.moons = moons; } public String getName() { return name; } public int getMoons() { return moons; } public void addRocketRouteTo( World otherWorld ) { reachableByRocket.add( otherWorld ); } public boolean canBeReachedFrom( World otherWorld ) { return reachableByRocket.contains( otherWorld ); } }

3.7. Resources

3.7.1. https://github.com/SpringSource/spring-data-neo4j

3.8. Maven entries

3.9. Spring context entries

3.10. Source

3.10.1. NodeEntity

4. Server

4.1. download

4.2. install & start

4.3. config

5. Getting started

5.1. Installing neo4j

5.1.1. Download neo4j from this site: http://www.neo4j.org/download

5.2. Start neo4j

5.2.1. Run neo4j_root/bin/neo4j.bat

5.3. Web admin page

5.3.1. http://localhost:7474/webadmin/

5.4. NeoEclipse

5.4.1. Is a eclipse editor for neo4j

5.4.2. What can you do using this

5.4.2.1. Create a connection

5.4.2.2. Load db

5.4.2.3. Create node/relationship

5.4.2.4. Cypher query editor

6. Cypher