Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Date in primary key
...but if you look at the HR and Payroll schemas you'll find several tables where the primary key contains not one date column but 2! This is used to provide a historical change capability (known as DateTrack). e.g. have a look at PER_PEOPLE_F (or if in R11, PER_ALL_PEOPLE_F)
Clive
<sunk_at_focushope.edu> wrote in message news:8p3g1p$624$1_at_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 Wed Sep 06 2000 - 18:09:53 CDT
![]() |
![]() |