this post was submitted on 19 Oct 2023
1724 points (98.8% liked)
Programmer Humor
32479 readers
413 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Speaking as a Senior Dev specialized in database access and design... you don't have to use all caps - SQL is actually case agnostic.
But... but my fucking eyes man. I'm old, if your branch doesn't have control keywords in all caps I'm going to take it out back and ol' yeller it.
There are few hills I'll die on but all caps SQL and singular table names are two of them.
Singular table names? You savage…
It's an English literacy thing - we have several non-native English speakers and using only singular avoids making those folks' lives harder. Besides it's really nice to autopilot that
categoryid
is a foreign key to thecategory
table. It also simplifies always plural words... I haven't yet writtenCREATE TABLE pants
but if I ever do there's zero chance of me creating apantid
.I always thought they should be singular to be closer to the names we give entities and relations in a entity-relation diagram.
That too, singular table names just makes a lot of stuff more automatic.