Difference between a graph and a hypergraph database?

database, definition, graph, nosql

Solution

How a certain graph database handles its edges is an implementation detail. Hence an answer cannot really be given in regards to "[hyper]graph databases in general".

From the point of mathematical graph theory however there is a difference:

- Edges as known from standard graphs model (directed or undirected) `1:1` connections.

- Hyperedges as known from hypergraphs model (directed or undirected) `n:n` connections.

Graph vs. Hypergraph:

A simple graph can be considered a special case of the hypergraph, namely the 2-uniform hypergraph. However, when stated without any qualification, an edge is always assumed to consist of at most 2 vertices, and a graph is never confused with a hypergraph. (Source)

Undirected hyperedges:

A[n] [undirected] hyperedge is an edge that is allowed to take on any number of vertices, possibly more than 2. A graph that allows any hyperedge is called a hypergraph. (Source)

Directed hyperedges:

Directed hypergraphs (Ausiello et al., 1985; Gallo et al., 1993) are a generalization of directed graphs (digraphs) and they can model binary relations among subsets of a given set. (Source)

Problem

Is there a difference between a graph and a hypergraph database? Is every hypergraph database system also a graph database system? I am asking for a side-by-side comparison. If it is possible to show this in one row: ``` Graph support: No/Graph/Hypergraph ``` Or if it is better to use two rows: ``` Graph support: No/Yes Hypergraph suppport: No/Yes ``` Or means "graph" and "hypergraph" the same in the database context?

Original source