## Property Graph Vs. Hypergraph

Property graph and hypergraph are two main types of graph models in graph databases. For each type the corresponding popular products are (view a survey of graph databases):

Property Graph: Neo4J, DEX, InfoGrid, InfiniteGraph, AllegroGraph

Hypergraph: HypergraphDB, Trinity.

**1. Property Graph**

In a property graph, each node and edge can be associated with multiple key/value pairs. For example, in a social network where each node is a person, a key/value pair like “age/25” can be associated with each node, and another key/value pair like “relationship/friend” can be associated with each edge. Since you can attach any properties with nodes and edges, this framework provides a powerful description for real word applications. Figure 1 shows an example of property graph.

Figure 1

**2. Hypergraph**

A hypergraph means an edge can connect more than two nodes. In other words, you can view an edge as a node and let this edge connect with other node or edges. Obviously, a RDF graph cannot be a hypergraph, because RDF triples cannot let a triple as an entity in another triple. In a computational geometry, we can say nodes within a region are connected by hyperedges. Figure 2 shows a hypergraph with 4 hyperedges, distinguished by different colors.

Figure 2

**3. Discussion: which one is better?**

I do not want to say “it depends” here. I want to make a decision.

In graph theory, hypergraph is more genetic than property graphs. However, my first comment is that **every hypergraph can be represented by a property graph**. For example, we can add an extra key/value pair to annotate the nodes connected by the same hyperedge. Second, property graphs is more close to graph structures in real applications. We are easy to understand an edge is a link between two nodes, but a hyperedge is not easy to understand and also not common in applications. That’s why I suggest taking property graph as the default graph model in a graph database.