I am planning a project where there will be a lot of data on the links between the next two nodes, and these links and their numerous properties are the main information with which all the work is done.

We can say that there is a graph whose nodes are only identified somehow, so as not to confuse, and the area of ​​interest is the edges.

How would you describe and store such data?

Options that still come to mind:

  1. relational database, node table, link table: node1id, node2id, json_properties
  2. Any specific, maybe, not relational, ground under the description of graphs?

Tasks : store, add new connections, determine whether two nodes are connected through a chain of connections?

  • A hash comes to mind from two vertex indexes that returns a pointer to an edge. Roughly speaking, the adjacency matrix instead of zeros and ones in which the corresponding pointer. In addition to this, you can store an indexed list of faces. Also, all this is very similar to the polygon grid (VV-mesh) of 3D graphics. Here is a good article, the truth is in English, and the algorithms of work for generating plants are mainly described there, but you may find something useful since it is still about the same data structure. algorithmicbotany.org/papers/smithco.dis2006.pdf - igumnov

3 answers 3

If I correctly understood the task, then, as an option - neo4j , the article on Habré

  • For sure. Thank you very much! - Sergiks
  • @sergiks - no problem, good luck with the implementation. - Zowie

Perhaps the answer to your question is Animo Language .

  • An interesting thing you develop! Thanks for the link. Have you investigated the work of Animotron under load? It seems superficially that with a linear increase in data volume, the computation time will grow exponentially. In essence, the question is the same neo4j. - Sergiks

You can try setting the PHP variables with the coordinates and these variables in MySQL, or if a person draws a graph online simply in PHP

  • one
    No, no, it's all about another area. Scroll through the graphs . - Sergiks