16
Beyond Foreign Keys
(lackofimagination.org)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
So... a polymorphic many-to-many join table?
Yes, that's correct. Here's how an entry in the join table looks like:
Fine for prototyping, but adds a scaling tech debt "time bomb" for a live system. Those associations had better be really sparse.
There's certainly the danger of creating too many ad-hoc or sparse relationships, which can cause issues. That said, when used for supplementing foreign keys, Tie-in can be a useful tool in a production system as well.
Don't you want a graph database at this point?
That idea crossed my mind too, but you can’t really use the full capabilities of SQL in graph databases, and that’s a deal breaker for me.
i was thinking the same thing