neo4j-contrib / neomodel

An Object Graph Mapper (OGM) for the Neo4j graph database.
https://neomodel.readthedocs.io
MIT License
949 stars 234 forks source link

If I didn't store my commutative diagrams as-is into the database, but instead use their native JSON format, how much performance increase would I get? #626

Closed enjoysmath closed 1 year ago

enjoysmath commented 2 years ago

Here's a video of what I'm doing:

Commutative Diagram app

I'm wondering though if there is any advantage to storing my CD as a graph (as in it's composed of Neo4j nodes / relationships in a one-to-one correspondence), instead of in a JSON property. Their native format to/from the editor is a JSON object.

So then I wouldn't be doing subgraph isomorphism searches in the probably naive way that I'm doing, but then if the diagrams were in a JSON property, I'm not sure I could do a regex match on them using Neo4j! The regex match is necessary so that the user can type in their own custom variable choices and these will match something else that's used in the library that they're querying. So I don't really kno whow to accomplish this using a JSON property, but if it were a StringProperty and I developed a standard form for storing a graph so that the standard form matches the regex if and only if there is a variable substitution such that the graphs are essentially the same.

So any advice / comments / guidance would be appreciated.

mariusconjeaud commented 1 year ago

This issue looks like it's Neo4j-specific, so in my opinion it should be rather on the Neo4j community forum or on the Discord.