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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Return ROWID in Java

Re: Return ROWID in Java

From: bennies <test_at_test.org>
Date: Wed, 18 Feb 2004 21:43:18 +0100
Message-ID: <4033cdec$0$41759$5fc3050@dreader2.news.tiscali.nl>


Daniel Morgan wrote:

> ReplyToGroups wrote:
>

>> use sequence_name.nextval
>>
>> If u want the primarkey value to be returned to the client

>
>
> Quite frankly that is a terrible idea. In a relational database
> one does not jump on a surrogate key just for convenience. And
> one certainly does not change a design to suit a front-end tool.
>
> There is not a single bit of difficulty in returning the existing
> primary key. I can't imagine why anyone would give or take this
> advice.
>
> And my apology if the above seems harsh. It is not intended as such.
>

The example needs an unique indentifyer and since there isn't one you create one and use a sequence.
What would you use ?
AccountEmail ? never use external keys.
AccountLogin ? hell no.. you just know it's going to be updated.

surrogate keys are just fine.. get over it.. Received on Wed Feb 18 2004 - 14:43:18 CST

Original text of this message

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