Tony et al.
Thanks for the advice and clarity. I will follow the consensus suggestion of
using ID ranges per site, made slightly more complex because I have a dozen
tables affected, but clearly even the more reason to shy away from solutions
that are hard work and affect perfomance.

As an aside, I would like to acknowledge the people who started this group,
those who maintain it, and those who contribute to it. Information like that
which I have received contributes positively to the construction time and the
quality of my code.

best regards
Leo Ramakers
Soft Option

Tony Blomfield wrote:

> 2 reasons.
>
> 1. Performance is hit.
>
> 2. Every time you make a query joining that table you must now refer to 2
> columns. This makes the join slower for the engine to utilise.
>
> 3. Conjugate keys add unneccessary complexity to your code.
>
> So why not allocate a base number to each site and offer a range of ID's
> starting at that base number OR
>
> if the sites all connect regularly, then why not use temporary ID's allways
> < 0 then when ever a connection to your "Home" site is made, allocate
> permenant ID's.
>
> What ever, making you PK an integer on a single column is seriously faster
> and easier to use. Often, the PK will carry no data information value. Its
> PRIMARY purpose is to supply uniqueness, and thus form the primary key.
> Often this technique is referred to as "Surrogate Key"
>
> Cheers,
>
> Tony.
> -----Original Message-----
> From: Leo Ramakers <[EMAIL PROTECTED]>
> To: Multiple recipients of list database <[EMAIL PROTECTED]>
> Date: Friday, 3 September 1999 10:01 PM
> Subject: Re: [DUG-DB]: how do I use paradox composite keys
>
> Tony
>
> > I havent followed this thread, but it is not good practise to use
> conjugate
> > PK's on any database.
>
> Can you say why?
>
> > Master table should have an Integer PK MasterID
> > Detail table should have an integer PK DetailID AND a foreign key into
> > Master.
>
> This is exactly what I have, but I need to merge a number of databases, each
> with the same range of MasterID values. The 'obvious' solution to me was to
> add
> a site ID to the master table, include it in the masterID key, and thereby
> allow
> multiple master and detail tables to be merged.
>
> regards
> Leo
>
> ---------------------------------------------------------------------------
>   New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
>
> ---------------------------------------------------------------------------
>   New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz

---------------------------------------------------------------------------
  New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to