More likely it's me that's confused...

Perhaps I didn't give all the details in the earlier mail. The user 
will only enter their surname. The script would then search the file 
for a match. For those odd souls how share a common surname they 
would have to select their firstname. I would then use the ID for all 
other references to that user which would avoid having to ask them 
again if they which Chris Devers or Christine Devers. 

The actual program is a clock-in system for the staff which I want to 
do in mod_perl. I thought a DBM file would be the fastest way to 
access the user list. I need to check that the user is in the list 
before I add their clock-in time to their own 'private' flat file 
which records the time they started, go to lunch ..etc.

>From what your saying I am not going to get a massive performance 
boost by using a DBM file. Should I just stick to using a flat file 
and extend it as you say?
Dp.


On 22 Feb 2005 at 10:00, Chris Devers wrote:

> On Tue, 22 Feb 2005, Dermot Paikkos wrote:
> 
> > I am looking for a way to store firstname/surname/id values in a 
> > file. Currently I am using a flat file to store just the christian 
> > name and surname in the format:
> > 
> > firstname|surname
> 
> Sorry, I'm confused.
> 
> If you're comfortable with this approach, why not just extend it to --
> 
>   firstname|surname|id
> 
> -- or even --
> 
>   id|firstname|surname
> 
> -- ? Isn't that the easiest way?
> 
> The "problem" with this approach is that interacting with it gets more 
> complicated -- users have to keep their ID around so that it's possible 
> to differentiate between "Chris Devers 42" and "Chris Devers 17". You 
> can't really get around this though -- assigning ID fields to records is 
> a theme common to all databases, as it's the only way around the problem 
> of distinguishing seemingly identical records. 
> 
> Coding all this up isn't very challenging -- all you have to do is add a 
> field and hooks to read & write it. The bigger problem is social, not 
> technical: everyone needs a unique identifier, either a randomly or 
> sequentially selected ID tag (e.g. id number), or some other token they 
> select themselves (e.g. account name &/or password). Both have drawbacks 
> (people don't like having to remember IDs; people don't like passwords) 
> but one way or the other, this seems like what you have to do.
> 
> 
> 
> (Also, I'm assuming that security isn't a consideration here, and that 
> the biggest problem with people accessing the wrong account is that it's 
> a nuisance, rather than a real security risk. If people accessing each 
> other's accounts *is* a problem, then you need to re-evaluate things: 
> each user needs a password or a similar authentication mechanism, the 
> user list file needs to be protected & probably encrypted, etc. If, on 
> the other hand, it's just annoying but nothing is actually harmed by 
> people using each other's accounts, then the approach you have is fine.)
> 
> 
> 
> -- 
> Chris Devers


~~
Dermot Paikkos * [EMAIL PROTECTED]
Network Administrator @ Science Photo Library
Phone: 0207 432 1100 * Fax: 0207 286 8668


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to