Tell me, in what form is it better to record the name of the fields in the database? For example, there is a catId field. Do you think it's better to call it cat_id ? Are there any standards and peculiar rules for recording field names?

ZY I understand that the question is strange and, perhaps, to some extent stupid, but still.

    2 answers 2

    While in the code it is customary to call variables in the form camelCase, the tables use the type name cat_id, type_id, and the like.

    Accordingly, it is better to call the fields with "_" and not to use capital letters - it will be easier to maintain and develop the code.

      A matter of taste. I personally adhere to such rules (section 10: SQL, databases)

      PS Reg.ru is not connected in any way, and I don’t share everything on other points :)

      • 10.5 and 10.6 - is controversial, but everything else - yes, in the case - DarkFighter