[eluser]jedd[/eluser]
[quote author="Kip zonder Kop" date="1262040051"]
Suppose one speaks fluently SQL ...
[/quote]
Fluent SQL, do you mean?
Quote:1) What do you think are the advantages and drawbacks of using the Active Record class as opposed to self written SQL?
AR promises DB-agnostic code, which is handy if you think you'll ever change DB's. In general, most people do not.
AR is arguably easier to read for other people coming to maintain your code.
AR gives you an extra level you have to debug.
Apart from relatively trivial applications, at some point you are likely to need to drop into 'raw' SQL - at which point the agnostic aspect becomes less clean.
AR automatically escapes your data - this is easier than using query bindings (though not by much) or db->escape() (a bit more).
Quote:2) What do you think are the advantages and drawbacks of using an ORM as opposed to self written SQL?
I don't use an ORM, but it seems to me that you get yet another layer that things can go wrong in - ie. another thing you (might) need to debug.
There seems to be very few people who start a new application from scratch, and think they want ORM, and go down the OO DB path - instead sticking with a conventional RDBMS with an ORM wrapper. I've never understood this trend.
ORM's are likely to have performance implications (though probably overestimated).