Databases Reference
In-Depth Information
Hypergraphs
A hypergraph is a generalized graph model in which a relationship (called a hyper-edge)
can connect any number of nodes. Whereas the property graph model permits a rela‐
tionship to have only one start node and one end node, the hypergraph model allows
any number of nodes at either end of a relationship. Hypergraphs can be useful where
the domain consists mainly of many-to-many relationships. For example, in Figure A-7
we see that Alice and Bob are the owners of three vehicles. We express this using a single
hyper-edge, whereas in a property graph we would use six relationships.
Figure A-7. A simple (directed) hypergraph
As we discussed in Chapter 3 , graphs enable us to model our problem domain in a way
that is easy to visualize and understand, and which captures with high fidelity the many
nuances of the data we encounter in the real world. Although in theory hypergraphs
produce accurate, information-rich models, in practice it's very easy for us to miss some
detail while modeling. To illustrate this point, let's consider the graph shown in
Figure A-8 , which is the property graph equivalent of the hypergraph shown in
Figure A-7 .
 
Search WWH ::




Custom Search