By Neo4j Staff | August 1, 2012
Thanks again everyone for attending the Intro to Spring Data Neo4j webinar. We hope you enjoyed the presentation and learned a lot. We answered all of your questions below. Feel free to use the listed resources to learn more or to discuss your open questions with us.
Spring Data Neo4j is a reflection of a graph’s nature: they are able to work and play well with other systems, while making it easy to make sense of connected data. It also demonstrates that indeed, graphs are everywhere. For more examples of this, be sure to come to GraphConnect in San Francisco, November 5-6 at the Hyatt Regency. There will be talks by hot start-ups, community contributors, and established enterprises telling their own graph story.
See all of your questions answered below:
Q: Do I always have to start the traversal at the root node?
A: It is possible to start a traversal from any node, or set of nodes. Those nodes can be looked up via an index or their id.
Q: What kind of tools are available to explore graph databases like Toad, Navicat, etc.?
Q: With hibernate, the created SQL can be helpful when trying to do some query performance analysis. Is there something comparable for Neo4j? Or another way to optimize queries?
A: You can set debug to level INFO and then the generated Cypher queries are logged. SDN has custom queries where you can specify exactly how the query looks. We support Cypher and Gremlin.
Q: In what format does Neo4j store data in file system?
A: Custom storage, optimized separate stores for nodes, relationships and different property types.
Q: In neo4j-server mode does it support fail-over and load-balancing in case I want multiple db nodes deployed?
A: Yes, Neo4j Enterprise can run it in a cluster with High Availability.
Q: In that case, do nodes have to share the storage area or data gets replicated across nodes?
A: It is configured as master/slave replication, each node running on its own machine and filesystem, using a custom protocol for syncing.
Q: Can you comment on the progress of the Spring-Roo add-on?
A: Right now there was no time to work on the Roo add-on. We’ll look into that after the 2.1 release which is due in about two weeks.
Q: Is is best to index all searchable fields?
A: As often, it depends on the usage pattern and the queries you want to run. There is a write-time price for indexing. Usually you only index the fields you need to look up start nodes for traversals.
Q: How do I make sure the attribute values (e.g. employee id) to a node are not duplicated in my graph DB?
A: You use a unique constraint on an index
Q: How do I do a one time data setup that is generally required for my enterprise applications?
A: There is a batch inserter if you do not want to use SDN directly.
Q: Did you run any performance test? How does it compare against conventional RDBMs in terms of performance?
A: It always depends on the use-case and data model, which is why generic or synthetic benchmarks are difficult. Graph databases are very fast for highly connected queries (lots of JOINS). For global queries the graph database doesn’t perform as well. Usually local graph queries are executed in constant time regardless of the size of the graph. There is a benchmark example in the first (free) chapter of Neo4j in Action by Manning.
Q: What are Repositories meant for?
A: Repositories are facades for data access. DAO is a similar pattern. SDN removes a lot of the boiler plate stuff you normally have to write.
Q: How is the support for High Availability (clustering/load balancing/fail over), etc.?
A: We have an HA/master-slave-replication solution
Q: What is the level of Spring support for Neo4j, in senses like transaction, etc.?
A: Just add @Transactional to your service methods like you normally would. We also support DI, Exception Translation, Spring Converters and JavaConfig.
Q: Do I need the Spring framework to use this? Can’t I use this as a stand alone library?
A: Right now yes, there are plans to make it work for instance in a JEE environment via CDI.
Q: Does it work as a persistence (JPA-based) to have temporary memory data and pushes to the storage?
A: Spring Data Neo4j is similar to JPA but relies on Neo4j’s caches and in memory structures. Spring Data Neo4j reads and writes your objects to the graph or provides a live view (advanced mapping).
We hope this Q & A has been helpful! For more information, be sure to check out the following resources:
- See the Spring Data Neo4j site for more info
- Guidebook on Spring Data Neo4j published by InfoQ (e-book & in print)
- All about Neo4j
- Neo4j & SDN videos and webinars
- Spring Data Forum
- Neo4j Google Group
- Local Area Neo4j meetup groups
Share your Graph Story?
Email us: email@example.com
Have a Graph Question?
Reach out and connect with the Neo4j staff.Stackoverflow