sulfericacid has asked for the wisdom of the Perl Monks concerning the following question:
Basically all I know from databases are from example scripts I see every once in a while and I know how to store variables. That's about the extent of my knowledge.
I'm using SDBM and have run into a weird situation. I'm asking for a user's name and storing that into the DBM. All I want is one name to be stored into the database for each person. What's weird about this?
$dbm{'name'} = $name overwrites the previes entry
$dbm{$name'} = $name creates redundant Aaron Aaron
$dbm{$name}; creates Useless use of DBM error
$dbm{$name} = ""; writes Aaron
My question is, why would you need to assign a null value to $name instead of just $dbm{$nam}; ? There has to be some kind of logic because it's more writing this way and this situation must have occured with other people. You don't always need a value, what happens if all you want is a key?
As far as I can tell there is logic to only want a key sometimes, this doesn't make any sense.
Also, I am looking to store more than one variable into a database under a specific key. What would be the easiest database to use to do this? Someone already suggest MLDBM, I was just wondering if anyone else had suggestions.
IE. $name: $address|$email|$phone
Thanks for all your help everyone.
"Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"
sulfericacid
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: Database storage confusion
by merlyn (Sage) on Mar 08, 2003 at 21:54 UTC | |
by sulfericacid (Deacon) on Mar 08, 2003 at 21:59 UTC | |
by Coruscate (Sexton) on Mar 09, 2003 at 00:37 UTC | |
by blakem (Monsignor) on Mar 09, 2003 at 05:57 UTC | |
by sulfericacid (Deacon) on Mar 09, 2003 at 01:08 UTC | |
|
Re: Database storage confusion
by Cody Pendant (Prior) on Mar 09, 2003 at 00:27 UTC | |
by sulfericacid (Deacon) on Mar 09, 2003 at 00:44 UTC | |
by demerphq (Chancellor) on Mar 09, 2003 at 15:38 UTC | |
by sulfericacid (Deacon) on Mar 10, 2003 at 04:11 UTC | |
by demerphq (Chancellor) on Mar 10, 2003 at 08:15 UTC | |
by Cody Pendant (Prior) on Mar 09, 2003 at 06:38 UTC |