Entity and database naming conventions

Hi. I’m looking for input on best practices in regards to entity attributes. Should the entity attribute and database table column name always match? Here are two situations where I think a difference may be appropriate.

  1. Company Name. We would want Company.name to be the attribute but “name” is a reserved word in the database. So perhaps the COMPANY table column should be COMPANY_NAME.
  2. Important Flag. We would want Company.important to be the attribute but maybe IS_IMPORTANT or IMPORTANT_F is a more appropriate column name.
    Thoughts? Thanks.

Hi Keith,

There are no any restrictions on naming columns except DB requirements (not a reserved word, length, etc.), so the column names can differ from attributes.

And as far as I know, NAME is not a reserved word. At least it works perfectly on all databases supported by the platform. As for boolean attributes, we usually name columns with “IS_” prefix, like “IS_IMPORTANT”.

Thanks for your feedback!