*DBM
Use dbm file with embeded data structures serialized. You may
use MLDB for this purpose, but as it uses Data::Dumper it could
be somewhat slow for your purposes (see Serialization uncovered). But the real pain in this are indexes.
*DBM allow you only one key. You must maintain several other *DBM files
with mappings of secondary keys to primary keys. And you must maintain them consistent.
And if you want to do a substring search, there is no easy method except for linear search.
And that could be terribly slow even for small database.
One more problem with *DBM files is parallel access. You cannot open *DBM
file for writing in two precesses. And if you do open/close scenario, data cannot be
cached and the access is very inefficient.
database/directory
Use RDBMS (Oracle,MySQL,...). Choose some lighweighted one and it will
have little impact on performance compared with programming comfor you gain.
Or even better use a directory service, like LDAP. There is
excelent open-source LDAP server: OpenLDAP.
This will do all the dirty index/schema/caching things. There are at leas two
modules on CPAN for LDAP access (Net::LDAP and perldap) and both works fine for me.
In reply to Re: Basic Database?
by gildir
in thread Basic Database?
by tomazos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |