http://qs321.pair.com?node_id=57687


in reply to Databases and tied hashes.

Definitely go with a real SQL server like MySQL. For your intentions, this file-based DB is simply not extensible enough. The standard DBFile engines have a pretty much similar routine: tie the file in, read and write hashes loading them on demand with zero amortization- that means, while they are simple to set up and use, their use really burns out at more than a few users, especially since no more than one user can access the DBFile at a time! (As far as I know, none of them implement record locking.) I see this as as a case of "I see no choice but to upgrade my existing systems to something that will be scalable enough to handle the load." Good luck!

Update: Yes, tilly. Very good, tilly. Next time read the main node and make sure that what you say is relevant- e.g. ala GDBM.

AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.

Replies are listed 'Best First'.
Re (tilly) 2: Databases and tied hashes.
by tilly (Archbishop) on Feb 11, 2001 at 07:53 UTC
    Please stop spreading FUD. Something doesn't have to have a SQL interface to be powerful. Berkeley DB supports applications with multi-threaded concurrent read-write access to databases of hundreds of terabytes at rates of over 30,000 accesses per second. Much of this native functionality is not available through the DB_File interface, but it is through BerkeleyDB.

    Now if you care about the complexity of your data model, then MySQL wins. If you care about preserving your data, in my professional opinion a good dbm used properly is as good or even a better choice than MySQL. If you want both, then you can use Postgres, Oracle, etc. But while I admit that the tied Perl interface is not the snappiest (though as some have discovered, it is pretty good), I do not believe that for straight lookups you are going to find any relational database that will beat a C application using Berkeley DB. It ain't going to happen, and it ain't going to happen for a lot of reasons.

    So unless you know something about scalability that I, Sendmail, Cisco, Ask Jeeves et al don't, please don't fall into the trap of thinking that dbms are just lightweight toys.

    For more information I suggest you visit Sleepycat Software.