Results 1 to 5 of 5
  1. #1
    revnice is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    61

    Table naming - use prefix or not?

    I've been using a prefix on all my columns, such as CUS_ in the Customers table and BKG_ in the Bookings table.



    I did it so I'd know where the data is coming from in a datasheet or a form. I could have 'City', 'State' or 'Zip' etc, in more than one table, but is it really necessary to use a prefix?

    What's the down side of taking them out and making the whole thing friendlier?

    Thanks - rev

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    a lot of people do this sort of thing but i've never seen a need for it. you should automatically know where the data is comming from based on the information that is displayed on your form. e.g. - labels and such that you have identified your table data with. imo, you don't need to do what you're doing. it is standard practice i think to identify to yourself and others which data is which with form controls.

  3. #3
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    I personally name my tables so they list easily and in sorting order along with the relationships I create amongst them.

    Ex:

    tblSubjects
    tblSubjectsAddresses
    tblSubjectsAppointments
    tblSubjectsCalls
    tblSubjectsSurveys

  4. #4
    revnice is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Aug 2010
    Posts
    61
    I've just read ajetrumpet's reply above and I'm thinking there must be a need to identify what table a NAME field is coming from if there are two such tables?

    Otherwise the design view in a form, for example, would show:

    NAME Name
    NAME Name

    Instead of:

    CUS_NAME Name
    COMPANY_NAME Name

    If there's a good answer to that, I won't bother with prefixes at all.

  5. #5
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by revnice View Post
    I've just read ajetrumpet's reply above and I'm thinking there must be a need to identify what table a NAME field is coming from if there are two such tables?

    Otherwise the design view in a form, for example, would show:

    NAME Name
    NAME Name

    Instead of:

    CUS_NAME Name
    COMPANY_NAME Name

    If there's a good answer to that, I won't bother with prefixes at all.
    revnice,

    the example you gave happens with auto forms, where it automatically sets labels for you with the same names in them as the actual field names. to make your life easier, yes you should differentiate if you are using auto forms. but most don't. They use their own forms that are freely designed. if this is the case, change the label content. there's nothing else to say

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 07-13-2010, 07:45 AM
  2. Add prefix to AutoNumber
    By sirmilt in forum Database Design
    Replies: 3
    Last Post: 07-09-2010, 01:41 PM
  3. Replies: 2
    Last Post: 10-27-2009, 07:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums