🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.comp.borland-delphi
5 messages
5 total messages Started by Thomas Wed, 19 Feb 2003 16:09
Autoincrement fields in paradox
#930
Author: Thomas
Date: Wed, 19 Feb 2003 16:09
14 lines
1653 bytes
Hello,

I have a paradox database. I want to create maintained secondary indexes but
I need a primary index first. The problem is that none of the field values
in the database are unique ( nor would a combination of the fields ).

I was thinking of using paradox's autoincrement field for this purpose.

I would like to know if you would agree with using autoincrement fields and
if not, why not?.

Thank you,

Thomas
Re: Autoincrement fields in paradox
#931
Author: KLinZ
Date: Wed, 19 Feb 2003 19:34
24 lines
1989 bytes
Thomas wrote:
> Hello,
>
> I have a paradox database. I want to create maintained secondary
> indexes but I need a primary index first. The problem is that none of
> the field values in the database are unique ( nor would a combination
> of the fields ).
>

Better redesign your database then :-) What kind of data does it contain?


> I was thinking of using paradox's autoincrement field for this
> purpose.
>
> I would like to know if you would agree with using autoincrement
> fields and if not, why not?.
>

There is nothing wrong with using an autoincremental field. I do it all the
time while designing databases.

--
www.zenobits.com
Re: Autoincrement fields in paradox
#932
Author: Bruce Roberts
Date: Fri, 21 Feb 2003 21:35
19 lines
2184 bytes
"Thomas" <ivsco1@eircom.net> wrote in message news:z3O4a.10558

> I have a paradox database. I want to create maintained secondary indexes
but
> I need a primary index first. The problem is that none of the field values
> in the database are unique ( nor would a combination of the fields ).
>
> I was thinking of using paradox's autoincrement field for this purpose.
>
> I would like to know if you would agree with using autoincrement fields
and
> if not, why not?.

Its a very bad idea if the db is multi-user. Because of the way in which
autoincrements are done they should never be used as primary keys. I believe
there is something in the BDE FAQ or tech notes to this effect. Certainly a
search of the Delphi database and BDE ng should turn up numerous posts on
this subject - with examples of alternative approaches.
Re: Autoincrement fields in paradox
#933
Author: Stephen
Date: Mon, 24 Feb 2003 17:49
33 lines
2645 bytes
"Bruce Roberts" <ber@bounceitattcanada.xnet> wrote in message
news:Z_w5a.7410$mZ2.1062414@news20.bellglobal.com...
>
> "Thomas" <ivsco1@eircom.net> wrote in message news:z3O4a.10558
>
> > I have a paradox database. I want to create maintained secondary indexes
> but
> > I need a primary index first. The problem is that none of the field
values
> > in the database are unique ( nor would a combination of the fields ).
> >
> > I was thinking of using paradox's autoincrement field for this purpose.
> >
> > I would like to know if you would agree with using autoincrement fields
> and
> > if not, why not?.
>
> Its a very bad idea if the db is multi-user. Because of the way in which
> autoincrements are done they should never be used as primary keys. I
believe
> there is something in the BDE FAQ or tech notes to this effect. Certainly
a
> search of the Delphi database and BDE ng should turn up numerous posts on
> this subject - with examples of alternative approaches.
>
>

Either I don't understand the question from the FIRST poster, or this reply
is something REALLY messed up.

With all respect, and sincerity, how can an auto-increment be bad in a DB
design for multi-user use?  Is this some kind of flaw with Paradox??
Re: Autoincrement fields in paradox
#934
Author: Bruce Roberts
Date: Tue, 25 Feb 2003 20:46
11 lines
1994 bytes
"Stephen" <some.where@out.there> wrote in message news:QWs6a.3646

> With all respect, and sincerity, how can an auto-increment be bad in a DB
> design for multi-user use?  Is this some kind of flaw with Paradox??

Its a Paradox flaw. A google search of Delphi/BDE ng will turn up many posts
on the subject. They all boil down to "don't use an auto-increment field in
the primary key". I don't recall the specifics off-hand, but my recollection
is that the problem has to do with when the increment counter is updated vs
when the new record is saved.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads