Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ORM with Graph-Databases like Neo4j in Python

i wonder wether there is a solution (or a need for) an ORM with Graph-Database (f.e. Neo4j). I'm tracking relationships (A is related to B which is related to A via C etc., thus constructing a large graph) of entities (including additional attributes for those entities) and need to store them in a DB, and i think a graph database would fit this task perfectly.

Now, with sql-like DBs, i use sqlalchemyś ORM to store my objects, especially because of the fact that i can retrieve objects from the db and work with them in a pythonic style (use their methods etc.).

Is there any object-mapping solution for Neo4j or other Graph-DB, so that i can store and retrieve python objects into and from the Graph-DB and work with them easily?

Or would you write some functions or adapters like in the python sqlite documentation (http://docs.python.org/library/sqlite3.html#letting-your-object-adapt-itself) to retrieve and store objects?

like image 486
dorvak Avatar asked Dec 02 '11 12:12

dorvak


People also ask

What is better than Neo4j?

TigerGraph has a longer loading time than its main competitor, Neo4j. When considering pre-processing time, TigerGraph is actually faster than Neo4j. TigerGraph is efficient because it needs 19.3x less storage space than Neo4j. TigerGraph is 24.8x faster than Neo4j on the one-hop path query.

Does Django support Neo4j?

The Paradise Papers app uses Django-Neomodel, a Django module allows you to use the Neo4j database with Django using neomodel.

Is TigerGraph better than Neo4j?

TigerGraph can effectively compresses the data size and needs 19.3x less storage space than Neo4j's. On the one-hop path query, TigerGraph is 24.8x faster than Neo4j. On the three-hops path query, TigerGraph is 1808.43x faster than Neo4j.


1 Answers

Shameless plug... there is also my own ORM which you may also want to checkout: https://github.com/robinedwards/neomodel

It's built on top of py2neo, using cypher and rest API calls under hood, i.e no dependency on gremlin.

like image 119
robsmoniker Avatar answered Oct 16 '22 05:10

robsmoniker