Putting value on relationships.

I have been working with databases as graph databases for a little while now and have looked seriously at the directed graph concept of graphs. My view is that directed graphs are a rather primitive way of looking at graphs.

The image above is a Property Graph Schema for a simple order management database. Orders are placed by People and each order contains Items in a certain Quantity. Order, Person and Item are nodes/vertices in a graph of graph theory joined by edges/relationships. Directed Graphs are graphs where each edge/relationship has a direction, as below:

The subtle difference is that each horizontal line (relationship) now has an arrow that points just one way.

I do not find Directed Graphs particularly useful. Relationships, by their nature, are bidirectional. For instance, for each Order that was placed by a Person, that Person placed that Order. Not to mention that, in our database schema, each order was placed by a maximum of one person. If we took the arrow to mean that only one of the relationship can exist (as an instance of that relationship), then we would read our second diagram as saying that each order only contain one item. Clearly this would not be a very useful database.

#entity-relationship #graph-database #standards #property-graph-schema #relational-databases #call for a property graph schema standard

Call for a Property Graph Schema Standard
1.10 GEEK