You're viewing a comment by David and its responses.

David Permalink
March 11, 2016, 08:55

I completely agree. You can learn SQL in a day at most. And then we use different ORMs, each having a learning curve and taking more time to learn than SQL. Also the performance is not that great.

Comment Responses

March 12, 2016, 03:49

Our company has a well designed database having several hundred tables. It has been refined over years to offer incredible efficiency and performance. It is remarkably consistent in making convention and use of appropriate types. It is not unusual, except in its consistency and elegance; nothing fancy or tricky, just solid, careful design. We interview hundreds of engineers having usually CS or Masters degrees, and many senior engineers with years of experience. We interview extremely smart people. Yet a very small number of candidates are able to successfully implement the basic SQL needed to query several tables. It's not because the sample is too hard, or because the candidates are dumb. It's because SQL is hard -- not the syntax, in particular, but, like C it's a very terse and compact language used to express more than a few, indeed arguably most or all, data relationships. I "learned C in a day" after reading the book. I learned SQL in several days. But understanding how to write software, and manipulate data well is my life's work. In my 50s now, having lead many engineering organizations and written much software, I have come to see that those having great hubris, disdain and impatience are typically blind to their own ignorance (often correlated with truly brilliant, yet utterly ineffective developers). Those humble (humbled?) enough learn how to use the abstrations that minds more brilliant have created are invariably the best engineers. Using their abstractions mindfully has helped me understand that SQL I learned in a day back in 1985 quite a bit better in the intervening decades.

March 12, 2016, 09:46

Now that the ranting fever is over, I will concede that ORM-s are useful, in the simple case where you need one or more rows from the same table (no joins). I don't use them to express 1-1, 1-N or M-N relationships, though, those would usually produce more queries than needed.

Bottom line is, with or without ORM-s, one has to know SQL in order to produce an acceptably fast and secure application; for example generating queries as strings and interpolating variables PHP-style, "select * from Users where id = $userid", should be strictly forbidden.

ORM-s are not frameworks, OTOH.

March 15, 2016, 08:38

That is a wrong assumption. The quality of SQL learned in one day will not give you any performance win.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "lcd_508": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.