RE: design - Mailing list pgsql-general

From Matthew
Subject RE: design
Date
Msg-id 183FA749499ED311B6550000F87E206C1FCFA5@srv.ctlno.com
Whole thread Raw
In response to design  (Jeff <jeff4e@rochester.rr.com>)
List 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@rochester.rr.com]
> Sent:    Tuesday, January 30, 2001 10:35 AM
> To:    pgsql-general@postgresql.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

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: LinuxWorld NYC
Next
From: "Brett W. McCoy"
Date:
Subject: Re: design