Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Date in primary key

Re: Date in primary key

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Tue, 05 Sep 2000 20:08:24 +0800
Message-ID: <39B4E238.75B3@yahoo.com>

Sybrand Bakker wrote:
>
> <eoin7_at_my-deja.com> wrote in message news:8p386u$tap$1_at_nnrp1.deja.com...
> >
> >
> > Is it okay to have a date column as part of a primary key, or should
> > this be avoided?
> > My db design includes an associative table that seems to require a date
> > column for uniqueness, along with the keys from the tables being
> > associated.
> >
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
>
> Shouldn't be a problem, provided you take care to trunc the date upon insert
> or update if the time doesn't interest you. Otherwise you will have to
> include an explicit range scan for the last day (which I usually do by
> appending 23:59:59).
>
> Hth,
>
> Sybrand Bakker, Oracle DBA

and at the other extreme, making you don't get two rows within a second

HTH

-- 
===========================================
Connor McDonald
http://www.oracledba.co.uk

We are born naked, wet and hungry...then things get worse
Received on Tue Sep 05 2000 - 07:08:24 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US