Is "campaign_ $" a bad name for an SQL column?

PostgreSQL allowed me to call the column "campaign_ $". I like the name because it is short and precise, and other potential names like "campaign_receipts" seem longer and less clear.

BUT, interestingly, I will eventually regret marking the $ symbol in the column name, either in PHP or in some other remote part of the architecture. Should I just stick to letters and underscores?

Thank!

+3
source share
7 answers

Yes you need. "campaign_receipts" is the best name.

+6
source

You probably won't regret it, but I still don't recommend it.

, ?

, .

+5

, "$" . ? ? ?

+4

, , () , . i18n, , , , .

+3

, , . campaign_money campaign_funds, .

+1

, , , .

/ .. , , .

+1

.

"$" may not be valid in future databases that you use (at some point you can go from PostgreSQL to something else), and it can also create problems at the application level if you do anything that matches column names an object if your programming language does not allow method names to have a "$" in them.

Just my suggestion.

+1
source

Source: https://habr.com/ru/post/1750511/


All Articles