D
D
Dmitry STEM2017-11-06 19:18:51
Database
Dmitry STEM, 2017-11-06 19:18:51

Is it possible to use a different naming style in the database and in the code?

I use camelCase in the code (variables, classes, functions) and snake_case in the database (names of tables, columns, the database itself), I don’t remember why, but I always write like that. Is this considered normal or is someone who has worked on the sites I used to write cursing me for it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
Johnny Gat, 2017-11-06
@STEM1

Yes, you can. Rather, it is even necessary, because. everywhere there are generally accepted standards.
For example:

  • SQL Style Guide - www.sqlstyle.guide/ru
  • C# Code Style - https://docs.microsoft.com/en-us/dotnet/csharp/pro...

V
Vladislav Yandimirkin, 2017-11-06
@vlaad360

Well, in the PL there are naming standards, you can google PSR.
The database has its own naming standards, SQL is usually camel_case, so it's normal that your names in the database and in the code are different, I personally don't feel any discomfort.
On the contrary, it infuriates when a person comes from some kind of Java to PHP and then names headerElement {} in styles.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question