Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

question: Are LeakBadActor and LeakPlatform necessary? #88

Open
LuchoTurtle opened this issue Feb 13, 2023 · 0 comments
Open

question: Are LeakBadActor and LeakPlatform necessary? #88

LuchoTurtle opened this issue Feb 13, 2023 · 0 comments

Comments

@LuchoTurtle
Copy link

Was taking a look at https://github.com/palavrapasse/docs/blob/master/core/data-model.md and found it a super interesting read! 🎉

I'm, however, having a bit of trouble understanding some of the bridge tables you've put in place - LeakBadActor and LeakPlatform.

To me, these make total sense if Leak <-> Platform have a many-to-many relationship, even though I kind of fail to see why they would have a many-to-many relationship to begin with, but perhaps you could reply to this issue if you want to clarify this for me.

However, if Leak -> Platform is one-to-many or one-to-one, I think having LeakPlatform as a bridge table might be a case of over-normalization. Why not simply have the platformId in the Leak table? It will save you a JOIN operation! ✨
Also, managing foreign and primary keys in bridge tables might cause trouble if you want to extend your database in the future. Doing updates and deletes and cascading down these tables are more cumbersome than you think!

Perhaps I'm missing something but I'd be delighted to learn why this design choice was made!
Thanks and keep up the awesome work!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant