Results 1 to 6 of 6
  1. #1
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199

    Email and Partner table Design

    It Seems Simple but my mind is hovering in lot of confusion



    I hav a table

    Partner
    -------
    ID PK
    name
    email_Id (FK)
    Subject
    Body


    and
    Email
    -------
    email_Id PK
    emailaddress
    type (1/2)
    Desc

    I have email which are in To if type in 1 and cc if type is 2. Could not be able to figure if this normalisation is Correct

    Any Idea as in my case A partner have set of to/Cc email in it. Can anyone suggest a better designing.

    Thanks in Advance

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    I think you have the PK/FK backwards. Seems the partner ID should be FK in Email.

    It is a balancing act between normalization and ease of data entry/edit.

    Splitting the data into two tables is normalization but is it really necessary? If every Partner will have two email addresses (and only 2 - 1 for To and 1 for Cc) and this will never change, then could just have 2 fields in Partner table. The separate table would definitely be required if you want to allow any number of emails for each partner.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199
    There can be case email id can change from to to cc, and also possiblity two partners can have same email id in cc and to also.

    Please can ot b ppssible to see in table format what u have 8n mind?

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    What you have now allows a partner to have only one email. If they need to be associated with two emails then options are 2 fields in Partner table holding the email addresses or a separate Email table with two records for each partner.

    If the same email will be both To and Cc then I suppose it will have to be in both fields or both records. If the email can change types, then in Partner table fields you have to edit the entries. If you use the Email table then just change the Type code of both records. It's irrelevant if partners have the exact same email (how could that happen?).

    I am not advocating one way or the other, only you can decide which works best for you.

    Or maybe I don't understand what the Partner table is for. I just noticed the Subject and Body fields. Why would email subject and body be different for each partner?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199
    Quote Originally Posted by June7 View Post
    What you have now allows a partner to have only one email. If they need to be associated with two emails then options are 2 fields in Partner table holding the email addresses or a separate Email table with two records for each partner.

    If the same email will be both To and Cc then I suppose it will have to be in both fields or both records. If the email can change types, then in Partner table fields you have to edit the entries. If you use the Email table then just change the Type code of both records. It's irrelevant if partners have the exact same email (how could that happen?).

    I am not advocating one way or the other, only you can decide which works best for you.

    Or maybe I don't understand what the Partner table is for. I just noticed the Subject and Body fields. Why would email subject and body be different for each partner?
    Subject and body, its different for all different partners, have different subject lines it (Totally different contents) and body. Now i will denormalize it and keep in column of to and cc.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Actually, there is a third arrangement you could consider.

    Partners
    ID PK
    name
    email_TO (FK)
    email_CC (FK)
    Subject
    Body

    Email
    email_Id PK
    emailaddress

    Email table would be a list of ALL emails and they would be unique, no duplicates. Then in Partners table, email would be selected from combobox list, and the email_ID would be saved. This approach might be preferable if there is a LOT of repetition of emails in the Partners table, if a lot of the partners use the same addresses and/or a lot of the emails are both To and Cc. If those circumstances are rare, then don't go this route. With this approach, a query would include the Email table twice, joining to each of the FK fields.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Add attachment to Outlook Email from Table?
    By floyd in forum Programming
    Replies: 3
    Last Post: 11-27-2013, 12:04 PM
  2. Table Design -- want to avoid a design that creates blank fields
    By snowboarder234 in forum Database Design
    Replies: 4
    Last Post: 10-08-2012, 10:13 AM
  3. Replies: 8
    Last Post: 03-24-2012, 11:03 AM
  4. importing email into table
    By ObjectStuart in forum Import/Export Data
    Replies: 1
    Last Post: 12-18-2011, 12:21 AM
  5. table design: one big table vs. multiple small tables
    By lstairs in forum Database Design
    Replies: 3
    Last Post: 12-31-2009, 08:46 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