How do you label an entire subgraph in the database?

I am creating an app with user-drawn graphs that are commutative diagrams (in mathematics). Sometimes I would like to label say a square graph of 4 edges and 4 nodes with "is a pullback square". Is this possible, or is the only way to create an owner node that connects to all 4 nodes (edges too ?) and has these properties attached?

Also looking for an answer to what I think is my similar question. I will have a big graph and want to quickly be able to mark sections of it by a concept of a 'view' or 'workspace'. The obvious options are a property (array?) or special purpose node with relationship for each. If you picked as solution please let us know.

1 Like

I am having the same question. Any updates? Thanks.

1 Like

Nope, ask me again in a month after I learn some more Neo4j queries. I'm back with Neo4j. ArangoDB documentation sucks and the drivers don't work as cleanly as Neo4j's.

I will try to remember to respond once I've picked a solution. I haven't been using Neo4j for a while, but I'm back now. I'm wanting to use it for saying a particular commutative diagram lies in a particular category which means all nodes and edges are objects / morphisms in the category (math).

@aprilsong0323 @senged

How I plan to solve this is brilliant. I will use 1 Database (i.e. one humungous graph) for my whole app, though individual components in the graph may be disconnected. It doesn't make sense to label a group of nodes. Why not show relationships with the graph database itself. Therefore, if my single end user is editing a graph, then when they edit a node in a CD (commutative diagram) the app will transparently tie it via an arrow (:InDiagram) to the ":Diagram" which contains as property the diagram name. And this Diagram in turn is linked to a (:Category) node with a unique name, meaning there is only one category C:Category named "R-Mod" for example, the category of left R-modules for a given ring R. There will be a ranking system on the whole graph to determine what is likely to come up in a search. Popular results are usually returned, these are highly-regarded or heavily used mathematical objects. So note, that although all these objects / nodes lie in a category, there's an intermediate node connecting all of that drawn diagram to the category. That makes the category easily setable, I mean the more you can flesh out the design into different concepts, the better off you are in the design.