Home  >  Q&A  >  body text

mysql - 数据库命名规范?

看老师给的文档,数据库命名很乱,有sname这样的,又有t_sex这样的。在网上查数据库的命名规范,有说要用Pascal命名法的,有说用下划线的,还有的说列名一律采用“TeacherName”“TeacherID”这种,又有说直接用“Name”“ID”这种的。
请问大家,在公司里都是怎样命名的?不同的数据库命名规范一样吗?

迷茫迷茫2743 days ago773

reply all(2)I'll reply

  • PHPz

    PHPz2017-04-17 13:04:39

    Use lowercase as much as possible. The case sensitivity of MySql is different in windows (case insensitive) and linux (case sensitive). Using lowercase uniformly can reduce unnecessary trouble. Use sname if the name is short or uncontroversial, otherwise use s_name.

    reply
    0
  • 阿神

    阿神2017-04-17 13:04:39

    Post an article
    http://my.oschina.net/dongzerun/blog/289664

    reply
    0
  • Cancelreply