You'll have my SQL when you pry my keyboard from my cold dead hands

image Background - Some people don't like the Entity Framework, some do.  Many see the need to blog about it.  You can guess the rest, or JFGI if your need more info.

The debate is nothing new; we have databases that are really good at storing data, searching that data, and spitting it back up.  Problem is the format spit up doesn't play well with how we use the data in code.  So we write some code to translate from one system to another.  If you want to be fancy, call it Object Relational Mapping.  JFGI as ORM if you want.

Any skinned cat will tell you, there is more than one solution to a problem.  That's not a problem, that's called choice.  A problem is when one two sides argue over different solutions so loudly you cannot hear what they are saying.  It's often overlooked that there are more than the two options present.

I write all my SQL.  I use a good deal of strongly typed DataSets.  I write my ORM code.  I have no problem with this, and have good reasons for doing such.

First, I know SQL really well, and more importantly I understand how to manage a database.  I'm not a DBA - I've never setup a quad-node cluster with latency-free fail over across multiple data centers - but I know how to read a query plan and setup an index.  I have over a decade of experience with setting up a database behind and optimizing the system - I see no point in tossing that hard earned experience away.

Second, and this is probably the most important factor, your ORM doesn't matter.  Your framework doesn't matter.  Your language, IDE, and ergonomic mouse you paid way too much for, don't matter.  When the servers start coming down, it's IO.  Disk or network bottlenecks are killing you.  We have the RAM folks, and the clock cycles are so plentiful we have to invent new ways of writing code just to use them all.  When all hell has broken loose, you need to know how your code works with the underlying IO; the fact you concatenated a few strings inline instead of using StringBuilder doesn't amount to a hill of beans.

So what do you take from this?  ORMs are evil and true ninjas master SQL?  No.  You take from this that no matter what you use, it is 100% your responsibility to understand how your platform works at the IO level and how to adjust it when needed.  You take from this that you pick a tool based on you and your teams comfort level with that tool, and you don't bother to get caught up in pointless saber rattling posts like this one.

If this has you all worked up, well... you can STFW for "kittens" or something.

Posted By Mike On Friday, June 27, 2008
Filed under datasets orm sql | No Comments

Submit this story to DotNetKicks   

Leave a comment

All comments are moderated manually.

Your name:

Your email (not shown):
Will display your Gravatar image.

Your website (optional):

About Michael

Michael C. Neel, born 1976 in Houston, TX and now live in Knoxvile, TN. Software developer, currently .Net focused. Board member of ETNUG and organizes CodeStock, East Tennessee's annual developers conference. .Net speaker, a Microsoft ASP.NET MVP and ASPInsider. Co-Founder of FuncWorks, LLC and GameMarx.

Proud father of two amazing girls, Rachel and Hannah, and loving husband to Cicelie who inflates and pops his ego as necessary.

 Subscribe to |  Comments

Follow me on Twitter | Contact Me

Related Posts

ASP.NET: Have a meaningful relationship with your DataSet

I'm a big fan of the XSD Schema or DataSet Designer in Visual Studio 2005.  Knowing how to use this tool effectively can save you hundreds of ... Read more

ASP.NET: Totaling a GridView part 2, the SQL

Not long ago, I wrote a quick guide on adding a total to a GridView.  It was based upon building a cumulative total while looping though the GridView ... Read more

Being a Duct Tape Programmer

Things I’ve said in a session before: “Friends don’t let friends ORM” “ORM is a pattern, not a framework” “I like typed datasets, and I cannot lie” It’s ... Read more

ORM talk at CodeStock Open Spaces

One thing I'm hearing from a lot of people who attended CodeStock last Saturday is how well the open spaces "track" was.  This is one area ... Read more

Birmingham Slides and Code

I had a great time last night in Birmingham hanging out with Robert Cain and speaking to the user group on DataSets.  it may not have been standing ... Read more

XNA 3D Primer by Michael C. Neel

XNA 3D Primer by Michael C. Neel
Buy Now: [ Amazon ] [ Wrox ]



ASPInsiders Member

ETNUG Member