[As community content, this post reflects the views and opinions of the particular author and does not necessarily reflect the official stance of Neo4j.]Software developers around the world spend a significant amount of their time struggling with database related problems instead of concentrating on the implementation of domain models and business logic. The idea of orthogonal persistence together with approaches of modern ORMs (Object Relational Mappers) have eased this pain to some degree, but when it comes to performing queries on connected data, there is still no way around hand-crafted design of database structures, almost on a per query basis.
Introducing JCypherJCypher, utilizing the power of Neo4j graph databases, aims to bring that long-given promise one big step closer to reality. This Java open source project (hosted on GitHub) allows you to concentrate on your domain model instead of how to map it to a database, at the same time enabling you to execute powerful queries upon your model with high performance. JCypher provides seamlessly integrated Java access to graph databases (like Neo4j) at different levels of abstraction. Let’s look at those layers from the top down:
Business DomainsAt the topmost level of abstraction, JCypher allows you to map complex business domains to graph databases. You can take an arbitrarily complex graph of domain objects or POJOs (plain old Java objects) and store it in a straightforward way into a graph database for later retrieval. You do not need to modify your domain object classes in any way. You do not even need to add annotations. Moreover, JCypher provides a default mapping so you don’t have to write a single line of mapping code or mapping configuration.
Domain QueriesAt the same level of abstraction, “Domain Queries” provide the power and expressiveness of queries on a graph database, while being formulated on domain objects or on types of domain objects, respectively. The true power of Domain Queries comes from the fact, that the graph of domain objects is backed by a graph database.
Generic Graph ModelAt the next lower level of abstraction – access to graph databases – is provided based on a generic graph model. While simple, the model allows you to easily navigate and manipulate graphs. The model consists of nodes, relations and paths, together with properties, labels and types.
Native Java Domain-Specific LanguageAt the bottom level of abstraction, a “native Java DSL” in the form of a fluent Java API allows you to intuitively and comfortably formulate queries against graph databases. The DSL (or Domain Specific Language) is based on the Cypher query language. (The Cypher query language is developed as part of the Neo4j graph database developed by Neo Technology). The DSL provides all the power and expressiveness of the Cypher language. Hence the name, JCypher. Additionally, JCypher provides database access in a uniform way to remote as well as to embedded databases (including in-memory databases). For more information on JCypher, visit the project homepage and GitHub page. UPCOMING WEBINAR: Converting Tough SQL Queries into Easy Cypher Queries Register for this week’s webinar on 9 July 2015 at 9:00 a.m. Pacific (18:00 CEST) to learn how to transform non-performing relational queries into efficient Cypher statements or Neo4j extensions and achieve your required response times.
About the Author
Wolfgang Schützelhofer, Community Contributor
Wolfgang Schützelhofer is the owner and creator of JCypher, which provides Java access to Neo4j databases at different levels of abstraction. He has more than 25 years of experience with hardware and software development and IT architecture with a focus on java-based service oriented solutions, front-end development and embedded systems.
From the CEO
Have a Graph Question?
Reach out and connect with the Neo4j staff.Stackoverflow
Share your Graph Story?
Email us: firstname.lastname@example.org