Re: Newbie question
From: mAsterdam <mAsterdam_at_vrijdag.org>
Date: Thu, 23 Jun 2005 01:00:21 +0200
Message-ID: <42b9ed83$0$35792$e4fe514c_at_news.xs4all.nl>
>
> yeah sorry, too tired and not thinking straight. I guess what I meant
> was that hopefully not too many hits will be from keys that are
> well-formed but invalid. i.e. not too many well-formed keys will hit the
> server only to be rejected because they are not in the database.
Date: Thu, 23 Jun 2005 01:00:21 +0200
Message-ID: <42b9ed83$0$35792$e4fe514c_at_news.xs4all.nl>
Paul wrote:
> Gene Wirchenko wrote:
>
>>>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. >> >> Say what? I hope that all entries get to that stage. That would >>mean that all of the data entered is well-formed. Now, that that is >>known, hit the server to see if the entry is valid.
>
> yeah sorry, too tired and not thinking straight. I guess what I meant
> was that hopefully not too many hits will be from keys that are
> well-formed but invalid. i.e. not too many well-formed keys will hit the
> server only to be rejected because they are not in the database.
One practical low-redundancy check is the eleven-proof
on dutch (postbank did not join) bank-accounts, position
from right to left:
( (sum(position * digit)) mod 11 = 0
with 10 digits or less, this garantuees malformed numbers whenever:
1 digit is mistyped
1 digit is inserted
2 digits changed places,
When 2 or more digits are mistyped, there is a chance of 1/11 that the
string is well-formed.
Received on Thu Jun 23 2005 - 01:00:21 CEST