pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Casey T. Deccio <ctdecci@sandia.gov>
To: Greg Patnude <gpatnude@hotmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: table constraints
Date: Wed, 02 Mar 2005 08:14:12 -0800
Message-ID: <1109780052.11469.4.camel@boomerang.ran.sandia.gov> (raw)
In-Reply-To: <d026qg$f7k$1@news.hub.org>
References: <1109618910.32166.0.camel@boomerang.ran.sandia.gov>
	<d026qg$f7k$1@news.hub.org>

On Tue, 2005-03-01 at 09:56 -0700, Greg Patnude wrote:
> foreign keys and primary keys have to be defined as unique at the
> table /
> column level if you want to implement a check constraint -- your
> contrived
> example doesn't stand up all that well -- If you want to use
> constraints -- 
> then your database schema should conform to traditional RDBMS theory
> and
> data normalization by having  primary and foreign keys instead of just
> trying to create arbitrary contraints on a non-normalized schema and
> implement constraints as a user-defined function...
> 

You are correct.  I did not take the time to write in these constraints
in the contrived example because I was rapidly trying to put together
something that would simply illustrate the problem.  They were/are in
place in my actual schema.  Thanks,

Casey




view thread (11+ messages)

Message-ID: <1109780052.11469.4.camel@boomerang.ran.sandia.gov>
Permalink:  ../1109780052.11469.4.camel@boomerang.ran.sandia.gov/
Also on:    postgresql.org/message-id/1109780052.11469.4.camel@boomerang.ran.sandia.gov

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ctdecci@sandia.gov, gpatnude@hotmail.com
  Subject: Re: table constraints
  In-Reply-To: <1109780052.11469.4.camel@boomerang.ran.sandia.gov>

* 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