From: Colin Wetherbee <cww@denterprises.org>
To: Phillip Smith <phillip.smith@weatherbeeta.com.au>
Cc: pgsql-sql@postgresql.org
Subject: Re: JOIN a table twice for different values in the same query
Date: Thu, 10 Jan 2008 17:30:36 -0500
Message-ID: <47869C8C.4080109@denterprises.org> (raw)
In-Reply-To: <002f01c853d7$63bc0680$9b0014ac@wbaus090>
References: <002f01c853d7$63bc0680$9b0014ac@wbaus090>
Phillip Smith wrote:
> As a side note - all the IATA codes are unique for each airport -
> wouldn't it be better to use these as the Primary Key and Foreign
> Keys? Then you wouldn't have to even join the tables unless you
> wanted the port names (not just the code)
This is true, but FWIW, my application will mostly be joining for the
name of the airport or the city, not the code.
I'll keep the idea of using the codes as keys in mind, though. Thanks
for pointing that out.
Colin
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: cww@denterprises.org, phillip.smith@weatherbeeta.com.au
Subject: Re: JOIN a table twice for different values in the same query
In-Reply-To: <47869C8C.4080109@denterprises.org>
* 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