I notice SDN4 has the concept of repositories and annotations for cypher queries, but this seems not much more than programming style? Neo4j-OGM seems straight forward, easy to set up, with a really practical and efficient API. I'm wondering why both projects exist. Are there any real differences between the two?
Spring Data Neo4j
http://projects.spring.io/spring-data-neo4j/
Neo4j OGM
https://neo4j.com/docs/ogm-manual/current/introduction/
The idea behind having separate projects is to enable as many developers as possible to integrate their JVM-based applications easily with Neo4j.
The two projects are closely related: Spring Data Neo4j's implementation is actually backed by the Neo4j OGM codebase. The Spring Data Neo4j project extends the capabilities of the OGM by allowing developers to work with familiar concepts - Repositories, Transactions, Templates, Derived Queries and so on.
However for developers who don't want to (or cannot) use the Spring stack, having a separate OGM project means they do not get shut out from using Neo4j.
Related
There are Object Mappers for JPA support for NoSQL databases like Mongo, Couch in Hibernate OGM, Spring Data. But, I could not able to find any reliable and actively developed framework for Dynamodb.
I looked spring-data-dynamodb, but it is stated that:
Due to external time and project commitments, I'm no longer able to continue active development of this project as of January 2016. Thank you to everyone involved in shaping the project over the past few years and thanks to all those who have raised issues and submitted pull requests over the time.
This lack of support causes model integration problems with widely used Java MVC frameworks.
Could you please explain me the technical details, why there is not a complete Dynamodb Object Mapper for JPA support?
I want to create an project and using MongoDB and Neo4J, both databases are need to use. Now the day's Hibernate OGM concept was launch and support provide for all NoSQL databases. If i am go for Hibernate OGM they used JPA apis for implementation and it is easy user for Hibernate users. If i am go for Spring-Data, we need to configure both Spring-Data MongoDB and Spring-Data Neo4j and use Spring-Data apis for that. My team is confuse for which technology we go Hibernate OGM or Spring-Data. We focus on some points and Go for Spring-Data. Points are as below:
Spring-Data is a early concept, the support for Spring-Data is easily provide at online forums but Hibernate OGM is new.
Spring-Data have various features for NoSQL databases, but for Hibernate OGM we are not sure all feature are provided that mention in this slide.
Hibernate OGM use JPA queries and JPA queries translate according to NoSQL vendor query and i think this cause performance issue. But in Spring-Data we easily user Cypher Queries and Mongo Template.
I am also confuse for Hibernate OGM have full support for Graph Db feature like maintain attributes of relationship?
Please suggest me for which technology we need to go.
If you choose to use two different NoSQL databases on a same project, it's probably because you really really need of their uniq features (geo-spatial queries on MongoDB, being able to execute graph traversals for Neo4j, and so on).
So Hibernate OGM is clearly NOT for you. You can use directly native API of Mongo and Neo4j. Or you can use Spring Data that claims to provide a consistent programming model (but not a single API).
I thought about using a graph database for my new project. It's
a project with many social relations and many other things which
can easily be represented by a graph.
Graph-Databases are much faster so I started thinking about it.
However, I have a Java Enterprise Web Application and I have been using
(until now) a relational MySQL Database with JPA.
Now my question: Is there already the same JPA functionallity
for Graph-Databases like there is for relational Databases?
I would like to use Neo4j or OrientDB.
DataNucleus JPA provides persistence to Neo4j. Supports basic relationships and an amount of Cypher query capabilities, and there is a tutorial for use with JPA (as well as JDO). Open to contributions to push it further.
OrientDB also provides an amount of support for JPA annotations direct IIRC.
What is the difference between these two graph databases: Neo4j and AllegroGraph? Which is better for Java Web programming?
If you have no reason to choose RDF + SPARQL (which both products support), Neo4j provides a clean Java API for manipulating a property graph (nodes + relationships + properties on both). For web applications, I wrote up an example using Spring Framework, which also exists in a simplified version as a workshop.
Disclaimer: Obviously I'm on the Neo4j team, and I don't have any in-depth knowledge regarding AllegroGraph.
I chose AllegroGraph over Neo4j because of its support for SPARQL queries. It seemed to me that the Neo4j approach of traversing a graph is less tidy, especially for more complex retrieval operations.
...and no, I have no affiliation with either organisation.
One other consideration is the licenses. AllegroGraph's free edition can be used as long as you have fewer than 50 million triples. See http://www.franz.com/agraph/allegrograph/ag_commercial_edition.lhtml
Neo4j is free as long as your project uses the community edition; only if you modify the Neo4j source you must open-source the modifications. The basic license terms can be found on their home page: http://neo4j.org/
AllegroGraph has a java client library which supports 2 standard java semantic API's: Jena and Sesame. The client source is EPL on github. AG supports sparql, transactions, reasoning, geospatial, temporal, and graph analysis. There are no extra features specifically for web apps, but it would fit into any framework as a library.
(I work for Franz.)
In addition to SPARQL, AllegoGraph allows you to write Prolog rules and queries. For complex query logic, it's much more expressive than SPARQL.
There are some examples in the Java client tutorial: http://www.franz.com/agraph/support/documentation/v4/java-tutorial/java-tutorial-40.html
want to develop my project on Google App Engine .I want to use google big table as database. For the database I have two options JPA and JDO. Will you guys please suggest me on it? Both are new for me and I need to learn them. So I will be focused on one after your replies.
Since you're using Data Nucleus, see their FAQ on JDO vs JPA. http://www.datanucleus.org/products/accessplatform_3_0/jdo_jpa_faq.html
DataNucleus AccessPlatform supports both JDO and JPA specifications of Java persistence. As such it has no "vested interest" in either technology, believing that it is for users to choose which they like best. There has been much FUD on the web about JDO and JPA, largely perpetrated by RDBMS vendors. This FAQ corrects many of these points
A key difference is that JDO support a rich domain model (logic together with data), in fact all persistent classes can have a reference to the current PersistenceManager, issue queries, and, I guess, it's possible not to have fields persistent by default.
JPA does not support such software design. In fact each Entity doesn't have a reference to the PersistenceManager, to have it you have to resort to ThreadLocal variables, which is not a very elegant and robust solution.
Since GAE BigTable is not an RDBMS, JDO is a better choice. There are some detailed comparision articles in Aphache JDO, it is helpful for me.
JPA persists java objects to relational data via ORM, while JDO is more general specification for java object persistence. So using JDO will give you more freedom in storage implementation options for your objects.
JPA is the leading java standard for persistence. So I'll say use JPA if you are using RDBMS and require ORM.
Hibernate is generally used as JPA implementation. If you need some extra features you can use hibernate specific annotations.
This question already looks to be discussed here JDO vs JPA for Java on Google App Engine