Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I see several things that I would call issues that should be "fixed".



    "Date" is a reserved word in Access and shouldn't be used for object names. (JET reserved (kb248738);ODBC (kb125948))
    Plus, it is not very descriptive. "Date" of what??
    What not to use in names


    Some suggestions:
    Use only letters and numbers (exception is the underscore) for object names.
    Do not use spaces, punctuation or special characters in object names.
    Do not begin an object name with a number.
    Do not use Look up FIELDS, multi-Value fields or Calculated fields in tables.


    The evils of lookup fields
    About calculated table fields

    Multivalued Fields . . . and why you really shouldn't use them!


    It helps to use prefixes in the object names:
    Use the prefix "tbl" for table names (tblContactNames)
    Use the prefix "qry" for query names (qryClinicalRecords)
    Use the prefix "frm" for form names (frmNewPatient)
    Use the prefix "rpt" for report names (rpt_Clinical_Records)


    It helps to give meaningful names to object names. It is considered poor programming practice to use "ID" as the PK field in EVERY table.
    For the table "Contact Name", I would use "tblContactNames". The PK field name in the Contact Name table would/could be "ContactNameID_PK".
    I use "ID" in the field name to indicate the field is an Autonumber type field. Obviously, "PK" indicates the field is the primary key field.
    In a/the related table, I would use "ContactNameID_FK" to indicate the foreign key field is an number of type long integer.

  2. #17
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    It helps to give meaningful names to object names.
    I use the phrase that object names need to be created in the context of the whole application and should be unique within that application, not just locally. The only exception to uniqueness being a FK field. Otherwise when you reference 'name' (which is a reserved word anyway) you also have to specify the table it comes from. Easy example of this requirement is when writing criteria in a query utilising a fieldname

  3. #18
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    @Ajax, agreed.

    I have created tables using this naming scheme:

    tblEmployee_Name_Def
    -------------------------

    end_pk
    end_EID
    end_ssn
    end_last
    end_first


    tblCompany_Name_Def
    -------------------------

    cnd_pk
    cnd_code
    cnd_desc



    tblEmployee_Placement_Def (or could be named tblEmployee_Placement_Link - (epl))
    --------------------------------

    epd_pk
    epd_endfk
    epd_cndfk
    epd_division_start
    epd_coverage_date
    epd_division_end



    When you see "epd_endfk", you know the field is in the table "tblEmployee_Placement_Def ", then the field is a foreign key to table "tblEmployee_Name_Def".
    A lot of work, but you always know where to look for a field.

  4. #19
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    like the field name 'end_first'

  5. #20
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I never looked at it that way....

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 11-10-2017, 07:52 PM
  2. Replies: 8
    Last Post: 03-16-2016, 10:11 AM
  3. Replies: 4
    Last Post: 12-31-2014, 02:18 PM
  4. Simple(?) Database Design Question
    By mkltmsck in forum Database Design
    Replies: 4
    Last Post: 07-07-2014, 02:00 PM
  5. Database design for simple inventory
    By toptech in forum Database Design
    Replies: 12
    Last Post: 10-24-2009, 07:24 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