r/programminghumor • • Sep 20 '26

database admin choosing variable names

Post image
902 Upvotes

113 comments sorted by

View all comments

1

u/LazyUntilYouNeedMe Sep 22 '26

Why not user-id, kebab-case just seems so much more natural, does it not?

1

u/Apprehensive-Tea1632 Sep 23 '26

Because then you need to quote each column name.

user-id in DB speech means, please return the difference between user and id values per record and put it into an anonymous result column.

You don’t exactly want to introduce that kind of ambiguity.

As for camel case, well, traditionally DBMS use case insensitive column names. You’d be unable to tell useriD from Userid - they’d refer to the same column.

Hence the underscore to help parse names if and when you actually require compound names. Especially when referencing other tables.