On 5/5/2011 3:26 PM, Rick Genter wrote:
Hm. I think the way I would handle this is to put the business logic
for inserting/updating into the room_assignments table into one or
more functions and have a special user that owns the tables and owns
the functions and declare the functions to be SE
l-general-ow...@postgresql.org [mailto:pgsql-general-
> > ow...@postgresql.org] On Behalf Of Jack Christensen
> > Sent: Thursday, May 05, 2011 3:20 PM
> > To: pgsql
> > Subject: [GENERAL] Multiple table relationship constraints
> >
> > 4. Validate application side -- this can wo
On Thu, May 5, 2011 at 4:14 PM, Jack Christensen wrote:
> It's not denormalized. It is an attribute that both tables have that have
> to match for it to be a valid link.
>
> Here's a contrived example:
>
> CREATE TABLE dorms(
> dorm_id serial PRIMARY KEY,
> gender varchar NOT NULL,
> ...
> )
On 5/5/2011 2:53 PM, Rick Genter wrote:
On Thu, May 5, 2011 at 3:50 PM, Jack Christensen
mailto:ja...@hylesanderson.edu>> wrote:
The trick is there are additional attributes of actions and
achievements such as a category that must match for the link to be
valid. These attributes are
On Thu, May 5, 2011 at 3:50 PM, Jack Christensen wrote:
> The trick is there are additional attributes of actions and achievements
> such as a category that must match for the link to be valid. These
> attributes are not part of the primary key of either record and can and do
> change.
>
So your
On 5/5/2011 2:28 PM, Rick Genter wrote:
On Thu, May 5, 2011 at 3:20 PM, Jack Christensen
mailto:ja...@hylesanderson.edu>> wrote:
What is the best way to handle multiple table relationships where
attributes of the tables at the ends of the chain must match?
Example:
CREATE TABL
> -Original Message-
> From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-
> ow...@postgresql.org] On Behalf Of Jack Christensen
> Sent: Thursday, May 05, 2011 3:20 PM
> To: pgsql
> Subject: [GENERAL] Multiple table relationship constraints
>
> 4. V
On Thu, May 5, 2011 at 3:20 PM, Jack Christensen wrote:
> What is the best way to handle multiple table relationships where
> attributes of the tables at the ends of the chain must match?
>
> Example:
>
> CREATE TABLE achievements(
> achievement_id serial PRIMARY KEY,
> ...
> );
>
> CREATE TABLE a
What is the best way to handle multiple table relationships where
attributes of the tables at the ends of the chain must match?
Example:
CREATE TABLE achievements(
achievement_id serial PRIMARY KEY,
...
);
CREATE TABLE achievement_versions(
achievement_version_id serial PRIMARY KEY,
achievemen