pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rich Shepard <rshepard@appl-ecosys.com>
To: Andy Lewis <alewis@roundnoon.com>
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Design Question
Date: Sat, 27 Nov 1999 10:41:42 -0800 (PST)
Message-ID: <Pine.LNX.4.10.9911271039570.5692-100000@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.05.9911271221150.8115-100000@rns.roundnoon.com>

On Sat, 27 Nov 1999, Andy Lewis wrote:

> Lets say that I have a DB that I am using to save address info on
> different brokers. Broker name, address, city, state, zip
> 
> Some brokers have representation in different states.
> 
> How would I be able to save that info so that it can be later selected by
> users looking for a broker in a certain state(s)?
> 
> What type of field/table/DB could I save that in for easy reference?

Andy,

  I suggest that you buy (or borrow from a library) a book on relational
data base design. To give you the simple answer to your question: have one
table for the broker's name and identification and a separate table for
their addresses. It's called a many-to-one structure and is created by
normalizing the data.

Rich

Dr. Richard B. Shepard, President

                       Applied Ecosystem Services, Inc. (TM)
              Making environmentally-responsible mining happen. (SM)         
                       --------------------------------
            2404 SW 22nd Street | Troutdale, OR 97060-1247 | U.S.A.
 + 1 503-667-4517 (voice) | + 1 503-667-8863 (fax) | rshepard@appl-ecosys.com




view thread (6+ messages)  latest in thread

Message-ID: <Pine.LNX.4.10.9911271039570.5692-100000@localhost.localdomain>
Permalink:  ../Pine.LNX.4.10.9911271039570.5692-100000@localhost.localdomain/
Also on:    postgresql.org/message-id/Pine.LNX.4.10.9911271039570.5692-100000@localhost.localdomain

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: rshepard@appl-ecosys.com, alewis@roundnoon.com
  Subject: Re: [SQL] Design Question
  In-Reply-To: <Pine.LNX.4.10.9911271039570.5692-100000@localhost.localdomain>
  References: <Pine.LNX.4.05.9911271221150.8115-100000@rns.roundnoon.com> <Pine.LNX.4.10.9911271039570.5692-100000@localhost.localdomain>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox