Is any API or tool available to convert PL/SQL procedure, functions to neo4j equivalent ?? Currently I use Oracle 10 as my data source and planning to switch to Neo4j.
No, there is not such a tool. Also it could be hard to do that, because Oracle is a RDBMS and Neo4j is a Graph database.
I'm not saying it's not possible, but you'll doing it once and it's better to write them by your own. And then ask here on StackOverflow if you aren't sure how to replicate in the Neo4j.
Related
We currently use gremlin.net library in a net core 3.0 application to connect to Azure Cosmos db. We would like to connect to neo4j.
Can we use same gremlin.net library for neo4j? Assuming gremlin
server is installed.
Will Neo4j.Driver library support gremlin
queries? What exact library to use?
Any code sample to connect and
create a node in neo4j using gremlin library for a .net core 3.0
application?
Is neo4j really a better graph model than Azure cosmos?
Can we use same gremlin.net library for neo4j? Assuming gremlin server is installed.
Yes, assuming you mean Gremlin.Net and yes, Gremlin Server should be installed hosting neo4j.
Will Neo4j.Driver library support gremlin queries? What exact library to use?
I don't think that's possible. Neo4j drivers will support Cypher based queries, not Gremlin.
Any code sample to connect and create a node in neo4j using gremlin library for a .net core 3.0 application?
The beauty of Gremlin is that the code examples for one graph database are the same for any other and for the most part, Gremlin in Java is the same as Gremlin in .NET or any other programming language (aside from changes that make Gremlin more ergonomic to the programming language itself). So, if you want to create a node then it's always going to be:
using static Gremlin.Net.Process.Traversal.AnonymousTraversalSource;
var g = Traversal().WithRemote(
new DriverRemoteConnection(new GremlinClient(new GremlinServer("localhost", 8182))));
g.AddV("person").Property("name","Bob").Iterate();
Is neo4j really a better graph model than Azure cosmos?
My personal opinion is that you try them both and determine which is better for yourself given you requirements. That is the choice that Apache TinkerPop and Gremlin help to give you in that you can try lots and lots of different graph systems out there to find the one best suited to your needs.
I know that you can write extensions that you can call from Cypher, but I'd really like to avoid having to write Java. I'm thinking something similar to SQL Server stored procedures. Is this possible, or could I maybe write a Cypher query and wrap it in some minimal Java to make the current capabilities work?
Besides #InverseFalcon's answer, there is really no Transact-SQL or PL/SQL-like languages for graphs yet.
The closest language I am aware of is SAP's GraphScriph:
GraphScript is a domain-specific, read-only graph query language tailored to serve advanced graph analysis tasks and to ease the specification of custom, complex graph algorithms.
Caveats: it is only available in the SAP HANA Graph product, and, as the quote says, it is read-only. For more details, see presentation slides and paper.
If you would like to avoid Java due to its verbosity but are fine with writing general purpose code on the JVM, you might want to try the Kotlin language. However, using anything else than Java tends to introduce some integration issues (across all JVM-based applications, not just Neo4j in particular), so be prepared to tackle those. There is an example project on GitHub for Neo4j Kotlin procedures to get you started. Caveats: even though there is basic Kotlin support in the Eclipse IDE, it's not on par with the IntelliJ edition. So you will probably need an IntelliJ license.
If you have access to APOC Procedures, you can use apoc.cypher.run() (or apoc.cypher.doIt() for write-queries) to execute a string cypher query.
You can always follow the tutorial for creating your own procedure and have it call the appropriate APOC cypher run procedure with a hardcoded query.
I have read the Neo4j Java Developer Reference Document recently, but I didn't see the information about Undo/Redo/Rollback, so I wonder is the Neo4j support these operations?
neo4j does not support undo/redo, but it does support transactions (so, rollbacks are supported).
See the specific documentation for Java, Cypher, the HTTP API, and Bolt.
as I was wandering in the Web looking for a Gremlin implementation for Neo4j I found these two possible solutions:
https://github.com/thinkaurelius/neo4j-gremlin-plugin
http://tinkerpop.incubator.apache.org/docs/3.0.2-incubating/#neo4j-gremlin
Does anybody know what is the difference between the two in practice?
I saw that 1. is a Neo4j plugin while it's not really clear to me what the second is, and if it would lock the entire database thus not allowing other connections (I noticed that it requires the path to the data folder).
Which one is preferred in the neo4j community?
Cheers,
Alberto
I'm not sure there's really a difference as there isn't a direct comparison to be made. The second link is to the TinkerPop project and specifically to the Neo4j implementation of TinkerPop APIs. It runs in an embedded mode and does not yet have support for HA (though we hope to have that soon). The Neo4j implementation can be run in Gremlin Server which let's you send Gremlin to it as a REST, websockets, etc endpoint.
The project in the first link you provided uses that implementation to allow you to send Gremlin to Neo4j Server - so the first project depends on the second.
Your rule of thumb should be activity in the source code.
neo4j-gremlin-plugin has 3 commits this year - https://github.com/thinkaurelius/neo4j-gremlin-plugin/commits/master
tikerpop is much more active - https://github.com/apache/incubator-tinkerpop/commits/master/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j
neo4j-gremlin-plugin
Extending existing Neo4j server with support for Gremlin Query Language.
TinkerPop Neo4j-Gremlin
Extending Gremlin console with support for Neo4j server.
I am considering Neo4J for some project. I recall reading somewhere that multi-document ACID transactions are only supported for embedded database, but not for the standalone one. Searching at the Neo4J site, I could not find any info about this. Some more information about this, or some pointers could help. Thank you.
Neo4j itself supports now transactions over the wire with 2.0
See: http://docs.neo4j.org/chunked/milestone/rest-api-transactional.html
Spring Data Neo4j does not yet and it will take a while until we get there, as it means to rewrite the core to use cypher throughout which it doesn't do now.