Received: from jumping-spider.aracnet.com (IDENT:root@jumping-spider.aracnet.com [205.159.88.14]) by hub.org (8.9.3/8.9.3) with ESMTP id NAA31505 for ; Sat, 27 Nov 1999 13:41:46 -0500 (EST) (envelope-from rshepard@appl-ecosys.com) Received: from salmo.appl-ecosys.com (216-99-206-23.cust.aracnet.com [216.99.206.23]) by jumping-spider.aracnet.com (8.9.3/8.9.3) with ESMTP id KAA24970; Sat, 27 Nov 1999 10:42:07 -0800 Date: Sat, 27 Nov 1999 10:41:42 -0800 (PST) From: Rich Shepard X-Sender: rshepard@localhost.localdomain To: Andy Lewis cc: pgsql-sql@postgreSQL.org Subject: Re: [SQL] Design Question In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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