http://www.perlmonks.org?node_id=248901


in reply to MySQL,, OR normal DB!

db provides a very different interface and structure than SQL-based databases, and that involves thinking about things differently. Depending on what you need, either might be a good design decision. Generally, SQL databases tend to be more engineered, with all sorts of nice features like scalability, security, and easy running of complex queries. If your data isn't quite flat, then SQL databases are an excellent match. However, they are more complex than the db, and if all you're trying to get is some form of persistant data, then they're probably the wrong solution.
SQL databases are table-driven, whereas dbfiles are best thought of as being like a perl hash. If you're trying to model several things that have structured relationships between each other, perhaps data about employees, positions, salaries, offices, and dependants, storing information both about the individual things and links between them, SQL is great for that. You could easily write a query that finds employees from the boston office with 2 kids who make less than $40k/yr.
SELECT EMPS.empid FROM EMPS,PAY,OFFICES,DEPS WHERE EMPS.empid = PAY.empid AND PAY.sal < 40000 AND EMPS.locid = OFFICES.depid AND OFFICES.name = 'Boston' AND 2 = (SELECT COUNT(*) FROM DEPS WHERE DEPS.parentid = EMPS.empid);
It's possible to model this kind of stuff in dbfiles, of course, but it likely will be slower, and doing queries will be a pain. Some of the advanced features in SQL databases, such as nice backup, replication, BLOBs (storing arbitrary files in the database in a column), and similar can be really nice. The downside to SQL is that it requires more thought, and if you don't want to spend the time writing your queries or designing tables, it's definitely not for you.
In sum, you can think of SQL as being like a nice car, and file db as being like a bike. Their purposes arn't entirely the same, cars are more powerful and essential for some purposes, but require entering a certain frame of mind, and their features are overkill if all you want to do is ride around the neighborhood. I hope this helps..