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: Mark D Powell <markp7832_at_my-deja.com>
Date: Tue, 05 Sep 2000 21:01:39 GMT
Message-ID: <8p3mv7$e7e$1@nnrp1.deja.com>

In article <8p3g1p$624$1_at_nnrp1.deja.com>,   sunk_at_focushope.edu wrote:
> 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.
> >

I disagree with Sunk as I think just because the Oracle Financials has no table with a date column as part of the primary key does not mean you do not have a valid design. What columns go into the key depend on your data and application needs.

--
Mark D. Powell  -- The only advice that counts is the advice that
 you follow so follow your own advice --


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Sep 05 2000 - 16:01:39 CDT

Original text of this message

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