You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I really ought to write up an article on "plurality" but that's one of the key things when designing a DB schema: is there always going to be at most one of this? Much easier to go from 2 to 3 than it is to go from 1 to 2. I very often see people add a users.email column; but that's terrible practice - it's very likely a user may have more than one email, they certainly will when they change their email address (a "new" and an "old" one). So "users.email" should actually be a separate table "user_emails" to allow for plurality. The same applies to so many things. Login credentials for example... You might think they "just have a password" but likely there's a lot of ways they might be able to log in in future: OAuth, passkey, etc. Auth credentials should be written plurally. When you break things up like this, not only does it help better plan for the future expansion of your schema, it also gives you more options for optimizing things.
https://discord.com/channels/489127045289476126/1305373087361007666/1305545365982019694
The text was updated successfully, but these errors were encountered: