Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Date in primary key
i concur that valid designs may use a date in the primary key; my only cautionary point is that (obviously) in a multi-user system it is always possible for things to happen simultaneously that you might not have anticipated.
hth,
tim hentzel
In article <8p3mv7$e7e$1_at_nnrp1.deja.com>,
Mark D Powell <markp7832_at_my-deja.com> wrote:
> 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.
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Sep 05 2000 - 20:15:16 CDT