Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2011
    Posts
    2

    Link a table to itself one to one

    Hi,

    I'm designing a schema where I need to relate a member to a spouse. The spouse may also be a member and a member can only have one spouse.

    If I store spouses in another table my schema would support polygamy and I don't want this. It seems to me like I need to relate the table to itself one to one but how? Any ideas?

    Thanks in advance.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by hghesteemed View Post
    If I store spouses in another table my schema would support polygamy and I don't want this.
    so don't use another table

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Mar 2011
    Posts
    2
    Quote Originally Posted by r937 View Post
    so don't use another table

    So I didn't..thanks 4 ur help

  4. #4
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Quote Originally Posted by hghesteemed View Post
    If I store spouses in another table my schema would support polygamy and I don't want this.
    Don't knock it 'till you've tried it.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •