Example
User First Name shippingAddressLine OrderTotal
user_first_name shipping_address_line order_total
Where snake_case is used
snake_case is the convention for variables and functions in Python and Ruby, and for table and column names in most SQL databases.
CONSTANT_CASE
Many languages write constants in uppercase snake case, such as MAX_RETRIES. Convert to snake_case here, then run the result through the Uppercase converter.
Why databases like snake_case
Many databases treat unquoted names case-insensitively. PostgreSQL, for example, folds unquoted identifiers to lowercase, so a column created as FirstName is stored as firstname unless you quote it everywhere. Lowercase names with underscores avoid that trap and stay readable, which is why first_name is the most common style for SQL tables and columns.
Language conventions
Python’s style guide (PEP 8) uses snake_case for functions, variables, and modules, and so do Ruby, Rust, and PHP’s standard library. It is also common for file names in Python projects and for environment variable names when written in capitals (DATABASE_URL).