0 Replies Latest reply on Jun 6, 2008 9:13 AM by (shane_mosier)

    Recommend You Use a Database Naming Convention

    Level 1
      Hello all,

      It seems one of the common problems people have is accidentally using reserved words when creating database tables. MySQL has a long list of reserved words, and even ADDT does not like you to use user(or maybe users).

      To avoid all possible problems with using reserved words, I recommend using a database naming protocol.

      You can use a recommended standards based naming convention, or use your own. I do something like this:

      table name:
      site_users_usr

      field names:
      id_usr - this is my primary key field
      username_usr
      password_usr
      name_usr
      email_usr

      If you use compound names, you should avoid any chance of using a reserved word. Use a naming convention that lets you distiguish between similar fields from different tables makes it much easier to know what table a field belongs to. If you have 3 tables all with a "name" field, it might get confusing. Howver if you use a naming convention, you might have name_users, name_members, and name_admins to distinguish the different tables.

      Shane