SQL vs .NET

I know this sounds like a really weird title but I’ve come to understand something (thats bugged me for a while): many developers won’t learn SQL; because it’s an extra language that “they don’t really need”. Instead many people use an O/R mapping layer that generates all the SQL (and often the entire database schema) for then, in order to hide the database away. in doing so, you give up most of the power of a SQL database* (I say this a lot, but I really can’t stress it enough). What does this have to do with .NET? Well, if I shouldn’t learn SQL because it’s an extra language, why should I have to learn VB.NET, and ASP.NET when I don’t really need to? I know you don’t have to (you can just use C#), but like SQL in the database world, it makes your life a lot easier when developing a .NET application. The fact is SQL is actually a lot side easier than most languages (yes, it has some weirdness, like INSERT should be a lot more like UPDATE), since it’s really just a query language (remember Structured Query Language). My advise to people working with a SQL database: take a few hours out of each day to learn a bit more about your database and the ways in which you interact with it. Run a profiler against an application with an O/R mapping layer, and then again with direct SQL calls. You’ll relaly be amazed at the difference. Considering how easy SQL is, it’s really a good thing to learn.

* A note to Object Orientated developers: If you’re going to use a O/R mapping layer, I would advise going with a good Object Database rather. O/R mapping layers are almost always slower than working with an object DB. There are lots of really good object DB’s out there, both Open Source and Commercial, just Google around a bit.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: