top | item 45407552 Ask HN: Db column naming: snake_case vs. CamelCase, what's the best convention? 2 points| jerawaj740 | 5 months ago 5 comments order hn newest leakycap|5 months ago snake_case because if your column ends up in a Postgres/MySQL environment your CamelCase will be become camelcaseAnd reading those becomes nightmaresIf you are just working in Javascript/Node.js, CamelCase is the preferred option. ompogUe|5 months ago Depending upon how you organize the words within them (*_id, *_name, *_percent), snake case allows you to parse the column names dynamically for things like santization and formatting. tuatoru|5 months ago SHOUTY_CASE ompogUe|5 months ago Snowflake forces this, so you would also never get CamelCase w/o always quoting the column name in your queries. catlover76|5 months ago It's camelCase, not CamelCaseI believe this is PascalCase
leakycap|5 months ago snake_case because if your column ends up in a Postgres/MySQL environment your CamelCase will be become camelcaseAnd reading those becomes nightmaresIf you are just working in Javascript/Node.js, CamelCase is the preferred option.
ompogUe|5 months ago Depending upon how you organize the words within them (*_id, *_name, *_percent), snake case allows you to parse the column names dynamically for things like santization and formatting.
tuatoru|5 months ago SHOUTY_CASE ompogUe|5 months ago Snowflake forces this, so you would also never get CamelCase w/o always quoting the column name in your queries.
ompogUe|5 months ago Snowflake forces this, so you would also never get CamelCase w/o always quoting the column name in your queries.
leakycap|5 months ago
And reading those becomes nightmares
If you are just working in Javascript/Node.js, CamelCase is the preferred option.
ompogUe|5 months ago
tuatoru|5 months ago
ompogUe|5 months ago
catlover76|5 months ago
I believe this is PascalCase