Welcome to the Monastery | |
PerlMonks |
Database storage confusionby sulfericacid (Deacon) |
on Mar 08, 2003 at 21:49 UTC ( [id://241438]=perlquestion: print w/replies, xml ) | Need Help?? |
sulfericacid has asked for the wisdom of the Perl Monks concerning the following question:
I do not have any real history of using databases and I don't have any books on them. Don't suggest me to read books since I don't have the funds to get any more :( And please don't down vote this because you think it's easy or something everyone should know because guess what, I don't. 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 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.
Back to
Seekers of Perl Wisdom
|
|