Re: Using a sequence to force unique DATE field

From: Mike J Cox <mike_at_kane.demon.co.uk>
Date: 1995/06/28
Message-ID: <186417067wnr_at_kane.demon.co.uk>#1/1


> We currently have a set of two tables that are linked together
> by only a DATE field. Usually, the field can be unique but since
> O doesn't support milliseconds with the DATE, we sometimes
> run into PK violations. (And yes, we should have used a SEQUENCE with a
> NUMBER type column, but that's another story.)
>

One has to question why you have date as a primary key, sounds like you would be best just using a surrogate sequence, your date sounds like it is not a pk anyway just a 'made up' one, date pks usually are.

Go for it use a surrogate, Codd will never know.

Mike

-- 
******************************************************************************
Michael Cox          Input Technolgies Ltd
Email                mike_at_kane.demon.co.uk
Compuserve           100045.1715_at_compuserve.com
Pager                0941 153237
******************************************************************************
Received on Wed Jun 28 1995 - 00:00:00 CEST

Original text of this message