Skip to content

Comment on Ask HN: Implementing a graph database using Postgres tables for nodes and edges?parent

Comments

edge is not stored as IAV the table hierarchy is:

Node <- Entities
Edge <- M2M

which is strange since an edge is already a M2M.

Thanks for the monetdb link.

Ah ok, so in RDF terms each predicate gets its own table, which makes sense. Then you have a subject foreign key relation ship and a object foreign key relation ship to the node tables.

That would be better than one big table in performance, which was a major problem in the RDF on SQL databases.

Of course those accepted any graph, if one constrains the number of possible predicates/relations then this solution could more efficient.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.