In my problem domain (Product Lifecycle Management [PLM]), I encounter the need to connect edges to edges frequently. While PLM data models are Object Relational Models over relational databases, they bear a strong resemblance to graphs, specifically, directed property graphs.
I know you could uniformly insert a vertex between all pairs of vertices in order to provide a place to connect an edge, but this seems unnatural. Is this a common need? Are there other ways to handle it?
I can model edge to edge edges in an RDBMS, but as you can imagine, it takes a lot of joins to make it work.
Here are couple of ASCII art diagrams to illustrate where edge-to-edge connections are beneficial. (not all edges are labelled)
- The first shows an assembly of parts (only one shown). It shows the difference between the concept of an equivalent part, which is one that can be used in place of the prime part anywhere the prime is found; and the concept of a substitute part, which can only replace the prime part in the context of a given assembly. This is a vertex to edge to edge case.
assembly
|
|---> substitute part
|
v
prime
part ---> equivalent part
- The second shows how one part is superseded by another in a given assembly. This is an edge to edge to edge case. Note that you can't just connect the part to the new part, since it is an instance of the part in the assembly that is being superseded, not necessarily all of them.
assembly assembly
rev A --- has next revision ---> rev B
| |
|------------ supersedes ------------>|
| |
v v
part new part