3 ms·
Anyone have an idea how a graph database like Neo4J is implemented? I imagine it as a unique query language (cypher) sitting on top of a traditional relational
by wirthjason 5y ago
Anyone have an idea how a graph database like Neo4J is implemented? I imagine it as a unique query language (cypher) sitting on top of a traditional relational database.
- heinrichhartman 5y agoNeo4J is a native database build on the JVM. It does not use any underlying relational DBs. IIRC, Graph links are implemented as direct references to other node objects (if they are in memory), which make traversal way faster than what you would get with relational DBs.
- thanatos519 5y agoRedisGraph uses OpenBLAS sparse matrices which deliver astounding performance. It's not as feature-complete as Neo4J but it's a promising start.
- malthejorgensen 5y agoI’d imagine it’s more like an adjacency list structure with various indexes (similar to a regular relational dbs) to allows lookups based on node properties
- rajman187 5y agoNeo4J uses index-free adjacency which means each node is storing the address of where its edges point to. This raises an interesting question about “big” graphs and distributed systems—-storing the address in memory across machines. So Neo4J, last I looked into it, is very fast for reads using a master-slave setup but may not scale well beyond a single machine. Other approaches such as RedisGraph use OpenBLAS, but again you’re limited to a matrix representation. And yet others, like TitanDB (bought by DataStax and open-source community forked into JanusDB) use graph abstractions that sit on top of distributed systems (HBase, Cassandra, Dynamo, etc) and these rely on adjacency lists and large indices. So the idea of “big graph” has been around for at least 6 years in the NoSQL world, but indeed everything is not a graph problem, tempting as that may be to claim. Good article on native graph representation: https://dzone.com/articles/letter-regarding-native-graph https://dzone.com/articles/letter-regarding-native-graph
- samsquire 5y agoFrom Neo4j themselves - edges are referenced by index position in a file. https://neo4j.com/developer/kb/understanding-data-on-disk/ https://neo4j.com/developer/kb/understanding-data-on-disk/
- deleted 5y ago[deleted]
- tokamak-teapot 5y agoLabelled property graph: https://neo4j.com/blog/rdf-triple-store-vs-labeled-property-graph-difference/ https://neo4j.com/blog/rdf-triple-store-vs-labeled-property-...