SQL is not particularly nice for complex queries, either. The underlying model is good, but the particular syntax they chose is verbose, confusing, and non-portable.
I kind of agree, but I was conceding the most reasonable argument to the parent.
Re:Whatever happened to programming?
by james2vegas on Thursday March 04, 2010 @06:42AM
(#1166658)
'SELECT * FROM user WHERE id = ?'
OR
'SELECT getUser(?)' presuming you have a stored procedure/function getUser that returns the data you need, and you should (or a view, at least)
Re:Whatever happened to programming?
by mattmanser on Thursday March 04, 2010 @07:43AM
(#1166751)
SELECT *? A function in the SELECT statment?
Oh dear god, a blasphemer!
The former can cause performance problems if you have blobs as well as being an unnecessary security hole, the latter can cause performance problems over large datasets as it often forces the execution plan away from a set based solution.
"select name, pass, hash, email, realname from user where id = ?"
versus
session.get("User", x)