Re: [SLUG] Database Design Ideas?

From: Russ Wright (rwrigh10@tampabay.rr.com)
Date: Tue Aug 12 2003 - 18:05:31 EDT


Put a unique identifier on the person table such as an autonumber field lets
call it PersonID. Now create a second table with two fields lets call the
table spouse. The two fields should be HusbandID and WifeID. Put the
PersonID of the Husband in the Husband field and put the PersonID of the Wife
in the WifeID Field.

Now the spouse table will give you the Huband and Wife Combinations.

You could also just add a a unique identifier on the person table such as an
autonumber field lets call it PersonID and another field called SpouseID. In
the SPouse ID field put the PersonID of the Spouse.

Regards
Russ

On Sunday 10 August 2003 06:00 pm, ethan@ethanzimmerman.com wrote:
> I'm helping my dad with a database he's putting together for work and I'm
> trying to figure out how to get around this problem:
>
> - he's got a person table and an apartment table (it's a retirment home)
>
> - To cut to the chase I'm trying to find an elegant way to pair up two
> married people from the people table (i.e. Tom Jones and Nora Jones are a
> married couple and each exist as a seperate record in the people table) So
> I can then refer to the couple as a single entity
>
> - some ideas
> - I could give each person a marrige ID number and then pair up the
> numbers - I could use a Spouse ID field that links to the appropriate
> record in the person table (but that makes the pairing subroutine a bit
> harder)
>
>
> Any ideas about how I should do this?
>
>
>
>
> -----------------------------------------------------------------------
> This list is provided as an unmoderated internet service by Networked
> Knowledge Systems (NKS). Views and opinions expressed in messages
> posted are those of the author and do not necessarily reflect the
> official policy or position of NKS or any of its employees.

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 16:35:37 EDT