cypher
is SQL like query language, based on ASCII art, to interact with graph database.
Programmatically, there are different alternatives to interact with neo4j. They are listed below.
Directly use dropwizard-jdbi.
- This will involve having JDO interfaces, which will have methods, having annotations with cypher queries directly in their annotations.
- Can handle complex cypher queries, which also means no compile-time checks.
- Duplication of code for normal CRUD operation for most of the entities.
- Ref:
Java DSL for cypher.
- Java Fluent DSL equivalent for cypher.
- Ref: https://github.com/Wolfgang-Schuetzelhofer/jcypher/wiki
Object-Graph-Mapping, which is similar to ORM for relational database.
- Has annotations like
NodeEntity
&RelationEntity
for classes,Relationship
for member collections. - Ref: https://neo4j.com/docs/ogm-manual/current/tutorial/