Thursday, April 23, 2020

table or property graph?

Currently in v7 I'm using JSON to store a dictionary of nested dictionaries and lists. That design is somewhat fragile in that 1) it doesn't allow atomic operations like a database; 2) it is an approximation for a property graph.

Because what I care about is nodes and edges with attributes, my data structure and code is essentially a DSL property graph. I previously recognized this (see v5) but didn't go very deep because I wasn't satisfied by Neo4j's rendering of nodes in a web interface. Now that I've built a web interface, I am wondering whether a property graph would be a better backend.

Neo4j is open source (https://github.com/neo4j/neo4j) so I shouldn't be any more reluctant to use it than I would be with SQLite3 (https://sqlite.org/src/doc/trunk/README.md).

I've been thinking that the next iteration (v8) would be table based. The blocker for that approach is my lack of knowledge of SQL queries needed to replace the current functions that use nested dictionaries. If I were to use a property graph in v8, I'd need to learn Cypher.

No comments:

Post a Comment