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

Home -> Community -> Usenet -> comp.databases.theory -> Re: sql tables

Re: sql tables

From: David Cressey <cressey73_at_verizon.net>
Date: Thu, 11 Oct 2007 20:18:45 GMT
Message-ID: <FyvPi.5420$q42.2851@trndny06>

"Roy Hann" <specially_at_processed.almost.meat> wrote in message news:LJKdnSs3w_-6H5PanZ2dnUVZ8taknZ2d_at_pipex.net...
> "David Cressey" <cressey73_at_verizon.net> wrote in message
> news:OVuPi.10972$br2.6118_at_trndny03...
> >
> > "Roy Hann" <specially_at_processed.almost.meat> wrote in message
> > news:ds2dnQF3Rrfm0pPaRVnyigA_at_pipex.net...
> >> "David Cressey" <cressey73_at_verizon.net> wrote in message
> >> news:2RrPi.10966$br2.10003_at_trndny03...
> >> >
> >> > All of the "major" SQL DBMS products permit storing more than one
> >> > identical
> >> > row in a table. However, they provide several ways the database
> >> > manager
> >> > can
> >> > protect the database from that event. The simplest is to declare a
> >> > primary
> >> > key for the table.
> >>
> >> Sadly given that it is now considered "best practice" to blindly and
> >> automatically attach an entirely spurious unique "primary key" value to
> >> every row in a table, that would be entirely futile.
> >
> > Why is is sad? What's wrong with declaring a primary key? Or do mean
> > something else by "attach"?

>

> I mean precisely that: attach. Construct a tuple that represents your
> proposition, and then *attach* a synthetic value that is chosen precisely
so
> that it is unique (usually the next sequential number in practice), and
call
> that your primary key. And that makes me sad.

In that case, I guess you and I are on the same page. I said, and meant, "declare a primary key". Sometimes it's not possible to declare a primary key. More often than not, this means there has been a slip up in the analysis and design.

>

> Roy

>
> Received on Thu Oct 11 2007 - 15:18:45 CDT

Original text of this message

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