1722
submitted 10 months ago by tsuica@lemmy.world to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] xmunk@sh.itjust.works 4 points 10 months ago

I tend to use underscores on join tables so table foo_bar would have a fooid and a barid. I have somewhat soured on this approach though since there are a lot of situations where you'll have two m-m relationships between the same two tables with a different meaning... and having a fixed formula for m-m tables can make things ugly.

If I get to design another greenfield database I'll probably prefer using underscores for word boundaries in long table names.

this post was submitted on 19 Oct 2023
1722 points (98.8% liked)

Programmer Humor

31990 readers
78 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS