If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Link a table to itself one to one

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-21-11, 01:58
hghesteemed hghesteemed is offline
Registered User
 
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.
Reply With Quote
  #2 (permalink)  
Old 03-21-11, 07:56
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
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

__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 03-22-11, 01:05
hghesteemed hghesteemed is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 03-22-11, 11:58
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 11,726
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"
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On