Ecosystem Neo4j Professional Services 300+ partners 47,000 group members 61,000 trained engineers 3.5M downloads Mindset “Graph Thinking” is all about considering connections in data as important as the data itself. Native Graph Platform Neo4j is an internet-scale, native graph database which executes connected workloads faster than any other database management system. Neo4j
Cypher Cypher Query Language is to Neo4j what SQL is for relational databases. Open Source http://www.opencypher.org/ and ready for other Graph Database technology.
Cypher Person KNOWS Person Topic INTERESTED_IN INTERESTED_IN MATCH (person:Person)-[:INTERESTED_IN]"->(t:Topic)"<-[:INTERESTED_IN]-(otherPerson:Person) WHERE (person)-[:KNOWS]-(otherPerson) RETURN otherPerson
Neo4j-OGM :Topic :INTERESTED_IN @NodeEntity public class Person { @Id @GeneratedValue private Long id; @Property private String name; @Relationship(type = “INTERESTED_IN") private Set topic; }
Spring Data Neo4j •Convenient Data Access - Spring Data’s Domain-Driver-Design way •Derived Finder Methods - no Cypher needed •Abstraction from Cypher - if wanted •Specialisation for Graph Operations - graph-ish way to work with data
Spring Data Neo4j interface PersonRepository extends Neo4jRepository { Person findByName(String name); } MATCH (person:Person)-[int:INTERESTED_IN]"->(topic:Topic) WHERE person.name=$name RETURN person, int, topic
Spring Data Neo4j interface PersonRepository extends Neo4jRepository { @Query("MATCH (p:Person)-[:INTERESTED_IN]->(t:Topic) WHERE t.term={0} return p”) List customFindByInterest(String interest); }
Import •LOAD CSV - File, HTTP(S) or FTP •APOC - Support for JSON, JDBC… •ETL Tool - Import and map data from SQL source WITH “jdbc:mysql://database” AS url CALL apoc.load.jdbc(url) YIELD value UNWIND value.items AS item MERGE (:Item {title=item.title} LOAD CSV WITH HEADERS FROM “file:paradise.csv” AS row CREATE (:Officer {name: row.n.name, country: row.n.country,…
SDN⚡RX •Complete rewrite of Spring Data Neo4j & Neo4j-OGM •(not only) Reactive Support •(Reactive)Neo4jClient •Cypher DSL •real Immutable Mapping •new Spring Boot Autoconfiguration
SDN⚡RX public class Person { @Id private final Long id; private final String name; private Person(Long id, String name) { this.id = id; this.name = name; } public Person withId(Long newId) { return new Person(newId, this.name); } public Person withName(String newName) { return new Person(this.id, newName); } } @AllArgsConstructor public class PersonWithAllConstructor { @Id private final Long id; private final String name; private final String firstName; private final String sameValue; private final Boolean cool; private final Long personNumber; private final LocalDate bornOn; }