in reply to Wisdom of data in hashes vs. SQL
I am a big fan of MLDBM for simple databases. I am not familiar with DBM::Deep; I'll have to give it a look. However, I prefer a relational database, once the data design gets very complicated. There's lots of functionallity in relational databases that can be leveraged against. (Aside: any English whizzes like to correct or corroborate my use of "leveraged" there?)
If your $db is a HoH type structure then it is easy to pull certain records from it with a little Perl:
# store some stuff in the "database": $db->{ record_1 } = { greeting => 'hello', perl => 'rules', etc => [ 42, 99 ] }; $db->{ some_other_record } = { greeting => 'Oi, gente', perl => 'r0x0rs', etc => [ 38, 45 ] }; # and so on # now find keys of all records that "rules" my @keys_of_records_that_rule = grep { $db->{ $_ }{ perl } eq 'rules' } keys %$db;
-Colin.
WHITEPAGES.COM | INC
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Wisdom of data in hashes vs. SQL
by biosysadmin (Deacon) on Jun 13, 2005 at 22:27 UTC | |
by monarch (Priest) on Jun 14, 2005 at 02:13 UTC |