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: <sunk_at_focushope.edu>
Date: Tue, 05 Sep 2000 19:03:32 GMT
Message-ID: <8p3g1p$624$1@nnrp1.deja.com>

In article <8p386u$tap$1_at_nnrp1.deja.com>,   eoin7_at_my-deja.com wrote:
>
>
> Is it okay to have a date column as part of a primary key, or should
> this be avoided?

There's no Oracle doc says that you can not use a date as primary key or  part of primary key, so you could do it, but in the real world it seems people seldom does it. The best candidates for primary key are row_id, number fields.

I'm working with Oracle applications(Both Financials and Manufacturing), there are over thousand tables in the db, not a single primary key associates with date field.

You definately want avoid using date field as part of primary key.

HTH.
> 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.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Sep 05 2000 - 14:03:32 CDT

Original text of this message

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