Quote:
I've seen PHP's MySQL interface and I have to say I like GT::SQL much better. Something like GT::SQL (in fact, many of the GT:: modules) wouldn't even be feasible in PHP.You have to consider the value of a DB abstraction layer though GT:SQL does get things working with many DB's, but this is not nessecarily a good thing! While I will admit useful for commerical scripts such as Links SQL, if you want to take advantage of a databases full capabilties they are not good. They only allow you to use the basic features of databases, rather then taking advantage of the extra features that some databases have.
I was forwarded a message, in which Rasmus Lerdof (the guy that started PHP) was talking about DB abstraction layers. His quote was
Quote:
I am sure everyone by now has heard my opinion on db abstraction layers though. As far as I am concerned they are pointless. It is the wrong
place to do things. The right way to do database abstraction is at the
functional layer. ie. write a function that implements a certain
database
action your application needs. get_user_record(), for example. Then
write this function for each database your application needs to support.
Anything short of this and you end up with a nearly useless system that
is
only capable of using generic or lowest-common-denominator SQL
statements.
For really simple applications that is ok, I guess, but for anything
substantial you are going to have to use DB-specific SQL to take
advantage
of each database properly. See Oracle's DECODE() statement for a
blatant
example of this.
I have to admit I agree with this.
Cheers,
Michael Bray