I am trying to find good references for widely agreed naming/code-style standards for PHP (Laravel), JS and MySQL. In particular, I am looking at variable names and table column names.
From what I can see, by reading some guides and people's opinions, and reading code, it is widely accepted that:
- PHP Variables as camelCase
- JS Variables as camelCase
- MySQL column names as snake_case
This seems quite inefficient, since when writing applications making use of all the technologies (especially JS apps interacting with an API) there is a lot of mapping going on unnecessarily between the two (e.g. first_name
-> firstName
), whether that's in the backend or the frontend.
Is there any reason for this, are there any major drawbacks by using camelCase for MySQL column names?