Re: how to implement unusual constraint - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: how to implement unusual constraint
Date
Msg-id 20070626151524.GM23306@phlogiston.dyndns.org
Whole thread Raw
In response to Re: how to implement unusual constraint  (danmcb <danielmcbrearty@gmail.com>)
List pgsql-general
On Sun, Jun 24, 2007 at 06:45:00PM -0000, danmcb wrote:
> into two tables, one for the originals, one for the translations (the
> objects are actually phrases in many languages). But I'd rather avoid
> that because in all other ways, the objects have the same properties,
> reference the same objects, and so on. Splitting into two types is not
> really desirable, from the point of view of what they are modelling.

This sounds to me like you have a one:many possibility, and you
should split your columns up instead.  (In general, I find, when you
have a self-join, it's probably an indicator that some of the data is
repeated, and that tells you you're not normalised correctly.)

A

--
Andrew Sullivan  | ajs@crankycanuck.ca
The plural of anecdote is not data.
        --Roger Brinner

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: escaped rolenames in pg_has_role
Next
From: "Sergey Karin"
Date:
Subject: pg_catalog.pg_get_serial_sequence() returns NULL