From: | missive(at)frontiernet(dot)net (Lee Harr) |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: design |
Date: | 2001-01-30 23:31:36 |
Message-ID: | 957iso$mp2$1@node17.cwnet.frontiernet.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 30 Jan 2001 11:35:21 -0500, Jeff <jeff4e(at)rochester(dot)rr(dot)com> wrote:
>I have a design question. Lets say we want to keep track of users and
>their respective snail mail addresses. Each user can have up to 4
>different mailing address. Is it better to have all this information in
>one table. Or is it better to have a user table and an address table,
>and have the user id as a foreign key in the address table?
>
>Thanks!
>
>Jeff
>
The second option sounds much better to me.
Imagine trying to find out how many addresses each user has:
With everything in one table... tough one.
With all addresses in their own table and keyed by user id... simple.
I am sure you can find other reasons too.
Lee Harr
missive(at)hotmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Mike Hoskins | 2001-01-31 00:30:36 | Re: MySQL file system |
Previous Message | Michael Fork | 2001-01-30 22:18:06 | Re: case insensitive unique index |