News for hackers. Stuff that matters.
Re:Make the “semantic web” web 3.0 again – with the help of ... by noctune on Wednesday January 12, 2022 @03:02AM (#29903648)
What if you have something like (relatee_a_id, relatee_b_id, [rest of relation fields ...]) with the constraint that relatee_a_id < relatee_b_id?

Granted, it might not be very nice to query.

Re:Make the “semantic web” web 3.0 again – with the help of ... by patates on Wednesday January 12, 2022 @03:45AM (#29903890)
Well, that is what I actually use most of the time, but to nitpick, it still is not declarative, and semantically a and b have no meaning. Just to be clear, I'm saying these are in 99% of the cases not deal breakers but they can be if all you want to do is map graphs (and follow chains through many members), as there is also a significant performance cost to all this abstraction.

What you described is, IIRC, also what some file-based graph DBs do in the background with sqlite and abstract away from you (I've seen a couple custom ones in some projects). Left with a RDBMS, you just need to do it yourself and analyze how much it costs.