Re: Newbie question
Date: Wed, 22 Jun 2005 19:54:21 +0100
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.
Paul. Received on Wed Jun 22 2005 - 20:54:21 CEST