That sounds like a ”graph” DB which implements edges as separate tables, like building a graph in a standard SQL RDB.
If you wish to avoid that particular caveat, look for a graph DB which materializes edges within vertices/nodes. The obvious caveat there is that the edges are not normalized, which may or may not be an issue for your particulat application.