Do underscores in a MySQL table names cause issues?

前端 未结 11 914
不知归路
不知归路 2021-02-06 22:17

Do underscores in table names affect performance or cause issues on some platforms?

For example, user_profiles

Would it be better to use user

11条回答
  •  太阳男子
    2021-02-06 23:21

    No, it's perfectly good. In fact, it is the most recommended naming from MySQL (based on who they name their internal tables!).

    Be aware that naming that in Microsoft Windows the default MySQL behaviour is to lower-case your table names. This may cause problems. I am not sure what causes this.

    However I personally prefer to name my tables like UserLikesPage, User and PostComment for example, since it reflects the class name in my code and I don't use Windows with MySQL.

提交回复
热议问题