in reply to which database is best for perl ?

If I need a database, I choice postgres. Your particular case is postgres or mysql. Both are driven by DBI. The code for both are very similar.
Boris

Replies are listed 'Best First'.
Re: Re: which database is best for perl ?
by flyingmoose (Priest) on Feb 09, 2004 at 19:04 UTC

    Another vote for Postgres. Historically, Postgres has been a little more stable, robust, and feature-rich than MySQL, though the gap is closing rapidly. It's also a higher performance database, at the cost of some additional complexity and resources.

    I think my preference has much more to do with the preference for the elephant mascot and my anti-microsoftian dislike of "My" in front of program names :)

    Still, tons of Linux apps are written exclusively to use MySQL. I'd like to see them written with tools such as DBI, ODBC (pain!), etc, more often so that they are portable and users can choose what DB they want to use.

    If it's for learning purposes though, I'd definitely go the Postgres route.

    Sidenote: you said you were using the Cygwin version. Looks like a Win32 port is preceeding here: http://momjian.postgresql.org/main/writings/pgsql/project/win32.html. Until then, perhaps (just perhaps) MySQL might be better on Windows. Of course, anything other than MS SQL Server is a good thing :) Also, I believe Informix (disclaimer: untested & I have no opinion) is also free for Win32.

      Still, tons of Linux apps are written exclusively to use MySQL. I'd like to see them written with tools such as DBI, ODBC (pain!), etc, more often so that they are portable and users can choose what DB they want to use.
      Don't get me wrong: I, too, would love to see more apps that are written exclusively for MySQL to be database-agnostic, but the problem is not in the lack of using DBI. The problem is that all of the major databases I can think of (Oracle, MySQL, Postrgess, Sybase, MS-SQL) use different dialects of SQL. That is, you have to write out a different SQL statement for one DB than the other to do exactly the same thing.

      Granted, using DBI, or whatever the closest analog is in your language of choice, will make such porting issues easier, but there's no getting around the fact that, for example, join syntax is different between MySQL and Oracle. If you want your app to be usable on both DBs, simply coding it with DBI doesn't make it happen. You need to EITHER make all of your SQL so ridiculously simple that you might as well use a flat DB instead of an RDBMS, OR to make separate DB access sub-modules in your app for the databases you plan to support.

      ------------ :Wq Not an editor command: Wq