in reply to Basic Database?
*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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Basic Database?
by eduardo (Curate) on Jun 11, 2001 at 19:24 UTC | |
by gildir (Pilgrim) on Jun 11, 2001 at 19:46 UTC |