Why do Python and SQL use snake_case?
Python’s style guide, PEP 8, asks for lower case with underscores in function and variable names. Databases such as PostgreSQL fold unquoted names to lower case, so firstName would need quoting every time, and first_name never does.
How do I convert camelCase to snake_case?
Paste the names and pick snake_case: firstName becomes first_name, and XMLHttpRequest becomes xml_http_request. A capital after a lower-case letter starts a new word, and so does the last capital of a run.
What is CONSTANT_CASE?
Snake_case in capitals, such as MAX_RETRIES or DATABASE_URL: the form for constants in most languages, and for environment variables.