Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: Re: which database is best for perl ?

by etcshadow (Priest)
on Feb 09, 2004 at 20:34 UTC ( [id://327740]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: which database is best for perl ?
in thread which database is best for perl ?

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://327740]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-25 11:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found