RE: design

From: Matthew <matt(at)ctlno(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: RE: design
Date: 2001-01-30 16:39:56
Message-ID: 183FA749499ED311B6550000F87E206C1FCFA5@srv.ctlno.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Depends on your needs. Typically I would always break out the addresses
into another table, since it's much more flexible. creating four separate
address fields in the user table will reduce the need to perform joins and
thus perhaps make your schemea a little simpler, and your queries a little
faster. However if users typically have less then four addresses then this
is not efficient either.

> -----Original Message-----
> From: Jeff [SMTP:jeff4e(at)rochester(dot)rr(dot)com]
> Sent: Tuesday, January 30, 2001 10:35 AM
> To: pgsql-general(at)postgresql(dot)org
> Subject: [GENERAL] design
>
> 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

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2001-01-30 16:44:19 Re: LinuxWorld NYC
Previous Message Jeff 2001-01-30 16:35:21 design