C
C#5mo ago
V0FBU1VM

Dublicate Properties in Tables?

I have a table named Users and one named Organizations. The relation between them is many to many. The joining table is called OrganizationMember. I'm wondering whether it would be a good idea, to store certain properties from the User table inside the OrganizationMember. Such as Email, & Full Name and AvatarUrl. The reason being is that OrganizationMember will be used very much. I don't want to modify my queries to include the User every time. Any suggestions would be appreciated.
1 Reply
Angius
Angius5mo ago
It doesn't really make sense Sure, pivot tables can have some data. Many to many between item and order, with the quantity on the pivot, for example But moving properties from one of those tables to that pivot makes zero sense Unless, maybe, the properties can differ For example, user's avatar in one organization can be different than their avatar in other organization
Want results from more Discord servers?
Add your server