Results 1 to 6 of 6
  1. #1
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664

    Relationhips Table

    In the file attached is a relationships report for my db. I have two questions on it. The first is as you can see on some tables the primary key is never referenced.



    The table tblPropertyPass, tblAttendence have this characteristic. Is this okay or is this a sign of bad db design?


    Also, in tblPersonnel, I want to put in the field ysnMeetingID.

    It is a primary key in tblMeetings, and a foreign key in tblAttendence. But in tblPersonnel it is just there,
    the need for it is clear in the SQL UPDATE code sequence, but it is neither a primary or foreign key in tblPersonnel.

    Is the sign of a bad db design or is it acceptable?

    Any help appreciated. Thanks in advance.

    Respectfully,

    Lou Reed
    Attached Files Attached Files

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    1) I don't think this is bad design. These appear to be transaction tables, and I don't think it's unusual for their primary keys not to be used elsewhere.

    2) I can't see why a meeting ID field would be in tblPersonnel. Presumably a person can attend many meetings, so the attendance table seems like the appropriate place for the meeting ID field. I'd question the ysn prefix, which to me implies a Yes/No field, which this couldn't be.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    The Meeting_ID field is there as a companion to ysnMeeting_Invite_Sent. It is good that we know a meeting invite has been sent, but a ysnMeetingID will tell us for which meeting the ysnMeeting_Invite_Sent applies.

    Just to have a notice that the meeting invite has been sent should immediately trigger the question, for what meeting was the invite was sent?

    That is why I want to add ysnMeetingID the tblPersonnel?

    My question is since ysnMeeting invite sent has been a primary key in tblMeetings and a foreign key in tblAttendence, can I use it again as neither a primary or foreign key?

    That is my question?

    Any help appreciated.

    Thanks in advance.


    Respectfully,


    Lou Reed

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    I believe the invite sent field should be in the attendance table. A person can be invited to many meetings; the invite relates to the meeting/person, not just the person. If you have the field in the personnel table, it can only record one invitation.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    That is a good point. I will try it out. Thanks for your input.

    Respectfully,

    Lou Reed

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    No problemo.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 1
    Last Post: 03-31-2016, 03:33 AM
  2. Replies: 4
    Last Post: 08-30-2012, 07:58 PM
  3. Replies: 8
    Last Post: 03-22-2012, 08:48 AM
  4. Replies: 2
    Last Post: 08-01-2011, 11:35 PM
  5. 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