I have a Rails 4 app having to do with graphs. These graphs need to be stored and I'm not sure of the best way to do it. Firstly, the app has a SQLite db in development and PostgreSQL in production. I would love to have graphs in JSON, but that can be achieved in several ways. Also, these graphs are going to be manipulated using some interface. I was thinking a graphical solution and a raw one in JSON.
I have some alternatives to implementation:
- Store the graph JSON files directly in the db. (how?)
- Store the graphs in db with tables (graph, edges, vertex) (probably not...)
- Store the graphs in db with tables and build a parser to manipulate the in JSON format.
What is your recommendations?