EzDevInfo.com

neo4j

An active model wrapper for the Neo4j Graph Database for Ruby. Neo4j.rb: (ruby)-[:LOVES]-(neo4j)

neo4j: How to Switch Database?

Hi I created a neo4j database with custom java application and tried to change path in configuration file in order to connect to created database.

While trying to check the data in webadmin console only node 0 is visible (seems that the database is empty). I tried to import the same database to Gephi and it's not empty.

Furthermore when I tried to switch back to the original database, which also wasn't empty, in webadmin only node 0 appeared.

I tried to modify the neo4j-server.propertied file the following way:

#*****************************************************************
# Administration client configuration
#*****************************************************************

# location of the servers round-robin database directory. possible values:
# - absolute path like /var/rrd
# - path relative to the server working directory like data/rrd
# - commented out, will default to the database data directory.
org.neo4j.server.webadmin.rrdb.location=data/rrd

# REST endpoint for the data API
# Note the / in the end is mandatory
#org.neo4j.server.webadmin.data.uri=/db/data/ #original database
org.neo4j.server.webadmin.data.uri="/db/mydatabase" #my database

# REST endpoint of the administration API (used by Webadmin)
org.neo4j.server.webadmin.management.uri=/db/manage/

# Low-level graph engine tuning file
org.neo4j.server.db.tuning.properties=conf/neo4j.properties

After switching back to the original database (commenting the new path and uncommenting the old)

org.neo4j.server.webadmin.data.uri=/db/data/ #original database
#org.neo4j.server.webadmin.data.uri="/db/mydatabase" #my database

the old wan seemed to be empty as well.

Does anyone know how and where to set path in order to see the appropriate database in webadmin console and be able to execute queries on the desired database?

Thank you!


Source: (StackOverflow)

Graph DBs vs. Document DBs vs. Triplestores

This is a somewhat abstract and general question. I'm interested in the inherent (as well as implementation-specific) properties of different approaches to persist unstructured data with both lots of internal references (graph-like) and lots of properties (JSON-like).

  • Since a graph is a superset of a tree, you can look at graph DBs (e.g. Neo4j) as a superset of document DBs (e.g. MongoDB). That is, a graph DB provides all the functionality of a document DB plus additionally also allows loops or has a native pointer type so you don't have to dereference foreign-keys/ids manually. So is there some tipping point that you reach when adding more references to your objects/resources where you're better off with a graph DB but were previously better off with a document store? Are there advantages to document DBs (storage space, performance?) or should you just always go with a graph DB just in case you'll need more references in the future?

  • Similarly, how do graph DBs and triplestores (e.g. RDF stores) compare? Graph DBs (where nodes and edges have properties) seem to be a superset of the simple triplestores. So for what problems (if any) perform triplestores actually better then, say Neo4j? (One advantage of RDF stores is that there is a standardized query language – SPARQL – although there seem to be a lot of people that don't like SPARQL and thus would call it a disadvantage.)

I guess my question is: The graph model (with properties) seems to be able to neatly express all kinds of data, what is the catch when you enter reality? I suppose the catch of graph DBs is performance, so I'd love to see some numbers or rules of thumb on what kind of slowdowns to expect when loading, querying and modifying data as well as memory, and persistent storage requirements (compared to document and triple stores). Also what about horizontal scalability? I got the impression that there the playing field is quite level.

Do you think it is possible that graphs with their expressibility will become the new default storage model for projects that have not super-large data, or are we doomed for a decade of Polyglot Persistence with RDBMS, JSON stores and Graph DBs living along each other that have to be integrated with even more glue code?


Source: (StackOverflow)

Advertisements

Time-based data in neo4j

have a question on graph databases, can some one help me please? I'm handling quite a lot of data in mysql about 5M records a day sent by a router like device, access points, wireless bridges. The data is usually health data, gps etc... these are devices on vehicles. How do you handle time based data in graph databases? Has anyone applied neo4j for time-based data? It would be great to know how you query intervals and how you'd go about modelling.

I guess I can create a node for every single time i receive data with properties set each time like changed gps, health? It would be a time based graph - does that sound right? well with 5M rows mysql isn't performing bad - but as router gets new functionality new data comes through and I need to create new models again which isn't bad but not great. i want something which is semi structured and makes relating different things like why the user got kicked out is because of an access point associated to the router is down. My usual queries would be to raise alerts to say one of the device is down or if there is a reduced throughput etc. Would neo4j help me in marrying up these relationships better than mysql?

Would love to know what you guys think, any comments + thoughts appreciated.


Source: (StackOverflow)

How to delete labels in neo4j?

How to delete labels in neo4j? Actually I deleted all nodes and relationships, then I recreated the movie database and still the labels I created before appeared on the webinterface. I also tried to use a different location for the database and even after an uninstall and reinstall the labels still appeared. Why? Where are the labels stored? After the uninstall the programm, the database folder and the appdata folder were deleted.

How to reproduce? Install neo4j -> use the movie database example -> create (l:SomeLabel {name:"A freaky label"}) -> delete the node -> stop neo, create new folder -> start neo -> create movie shema -> match (n) return (n) -> SomeLabel appears, even if you changed the folder or make an uninstall / install.

Is there a way to delete labels even if there is no node with it?


Source: (StackOverflow)

Populating a spring bean using a constructor-arg field

How can i inject a properties file containing a Map to be used as additional constructor arg using the field.

With a Map being loaded from a properties file

the bean is currently setup using:

<bean id="graphDbService" class="org.neo4j.kernel.EmbeddedGraphDatabase"
     init-method="enableRemoteShell" destroy-method="shutdown">

     <constructor-arg index="0" value= "data/neo4j-db"/>
         <constructor-arg index="1" value=?  />
</bean>

Java Equivalent:

Map<String,String> configuration =  EmbeddedGraphDatabase.loadConfigurations( "neo4j_config.props" );
GraphDatabaseService graphDb = new EmbeddedGraphDatabase( "data/neo4j-db", configuration );

Thanks


Source: (StackOverflow)

Neo4j - Cypher vs Gremlin query language

I'm starting to develop with Neo4j using the REST API. I saw that there are two options for performing complex queries - Cypher (Neo4j's query language) and Gremlin (the general purpose graph query/traversal language).

Here's what I want to know - is there any query or operation that can be done by using Gremlin and can't be done with Cypher? or vice versa?

Cypher seems much more clear to me than Gremlin, and in general it seems that the guys in Neo4j are going with Cypher. But - if Cypher is limited compared to Gremlin - I would really like to know that in advance.


Source: (StackOverflow)

What are the best ways to store Graphs in persistent storage

I am wondering what the best ways to store graphs in persistent storage are, for later analysis, search, clustering, etc.

I see neo4j being an option, I am curious if there are also other graph databases available. Does anyone have any insights into how larger social networks store their graph based data (or other sites that require the storage of graph like models, e.g. RDF).

What about options like Cassandra, or MySQL?


Source: (StackOverflow)

Hype around graph databases... why?

There is some hype around graph databases. I'm wondering why.

What are the possible problems that one can be confronted with in today's web environment that can be solved using graph databases? And are graph databases suitable for classical applications, i.e. can one be used as a drop-in replacement for a Relational Database? So in fact it's two questions in one.

Related: Has anyone used Graph-based Databases (http://neo4j.org/)?


Source: (StackOverflow)

anybody tried neo4j vs titan - pros and cons

Can anybody please provide or point out to a good comparison between Neo4j and Titan? One thing i can see is in terms of scale - Titan is scaleout and requires an underlying scalable datastore like cassandra. Neo4j is only for HA and has its own embedded database. Any other pros and cons? Any specific usecases. (Is Titan being used anywhere currently?)

I also have the following link: http://architects.dzone.com/articles/16-graph-databases-compared that gives a objective compare for graph databases but not much on pros and cons between Neo4j and Titan.


Source: (StackOverflow)

How does Datomic compare to Neo4j?

I am looking at integrating Neo4j into a Clojure system I am building. The first question I was asked was why I didn't use Datomic. Does anyone have a good answer for this? I have heard of and seen videos on Datomic, but I don't know enough about Graph Databases to know the difference between Neo4j and Datomic, and what difference it would make to me?


Source: (StackOverflow)

Is there any .NET binding for Neo4J? [closed]

Is there a .NET version/binding for Neo4j?

It looks like exactly what I want, but I'm working in C# on .NET.

Thanks


Source: (StackOverflow)

LIKE clause in CYPHER Query

It appears that LIKE is not supported in Cypher queries.

Is there any other construct that would perform the same task?

For instance:

start n = node(*) where n.Name LIKE('%SUBSTRING%') return n.Name, n;

Source: (StackOverflow)

How to kill a currently long running query in Neo4j

How can I kill a currently long-running query in Neo4j (without restarting the server)?

I know we can globally set a timeout for queries, but sometimes I want to execute heavy queries/creates/updates on the server that could take a while...

Thanks.


Source: (StackOverflow)

Convert Neo4j DB to XML?

Can I convert Neo4J Database files to XML?


Source: (StackOverflow)