Thread: Database Design

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    1
    Rep Power
    0

    Question Database Design


    I have a database that manages individuals and the organizations they work for. I want to add membership management to it. There is a Link table between the tblIndividuals and the tblOrganizations to handle the many-to-many relationship. For example;
    tblIndividual(1)---(M)tblLinks(M)---(1)tblOrganizations
    The key fields are:
    IndividualID
    OrganizationID

    My problem is there can be individual members and organization members. Any suggestions would be very appreciated. Thank you.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    38
    Rep Power
    12
    My problem is there can be individual members and organization members. Any suggestions would be very appreciated.

    If I understood you there'd be a foreign key to the organization table. But a member many not necessarily be attached to an organization.

    If this is the case, you'd need a dummy organization record with say with a primary key value 0

    Like this:

    TblOrganization

    OrgKey = 0
    Name = 'None'
    Description = 'Not part of an organization'

    TblMember
    MemberKey = 99
    MemberName = 'Sally Slacker'
    OrgKey = 0 <--- key to tblOrganization that indicates she's not enrolled

IMN logo majestic logo threadwatch logo seochat tools logo