Re: Newbie question

From: Paul <paul_at_test.com>
Date: Wed, 22 Jun 2005 19:54:21 +0100
Message-ID: <42b9b3de$0$30831$ed2619ec_at_ptn-nntp-reader01.plus.net>


Jon Heggland wrote:

>>I guess it's a practical consideration so that simple typos can be
>>trapped by the client, to save hitting the database server. In some
>>scenarios this could be useful.

>
> It does mean you'll have to maintain consistency between the server-side
> and client-side checksum algorithms, though.

True. But then many database constraints can be duplicated on the client to avoid repeated round-trips to the server. There was a long thread here a year or so ago on the desirability of clients being able to read the database constraints instead of being redundantly recoded. And then risking getting out of sync with each other.

> And there is no guarantee
> you won't be able to enter a non-existing yet valid key (i.e. with
> correct check digits), is there? And doing the lookup gives the user
> feedback that s/he actually entered the right key, not just a well-
> formed one.

True again, there is no guarantee someone won't type in another valid key, but it does knock out the vast majority of mistakes. I guess the most common error is to make a mistake in a single character (writing a 1 as a 7 for example). I think that checksums are specifically designed to ensure that changing any one character will invalidate the checksum. I could be wrong here but if not, they certainly would take care of most cases.

And to check that the key is valid (i.e. in the database) and not just well-formed, you do need a trip to the server. But hopefully not many entries will manage to get to that stage.

Paul. Received on Wed Jun 22 2005 - 20:54:21 CEST

Original text of this message