Skip to content

Tag: relational-database

Canonical way to store reciprocal data sql

I got a lot of instances of the same Class. Now these objects can be linked and this link can have a weight. Like in an undirected graph. Now I want to store the relationship between each two objects in my mysql database. Data looks like this I could do create a table with this structure: object1_id | object2…