SQL For Developers – 9 Reasons to bother

F03I0081 If you are a developer like I am, you’ve probably gotten by with pretty simple SQL for quite a while. In fact, my experience has been that developers don’t get much past SELECT, INSERT, UPDATE, and DELETE with the associated WHERE and ORDER BY clauses that are necessary to get anything done as a developer.

But there are times when knowing more would be helpful. So today, I thought I’d start a short series on helpful SQL for developers. Keep in mind, I’m a developer, not a DBA. I’m sure there may be better ways of doing some of the things I suggest. However, everything I suggest will be better than trying to do it all from your csharp or VB.NET code.

Let’s look at some of the reasons a developer should learn SQL:

  • If you only use the statements above, your code is almost certainly making more trips to the database than it should, or needs to. Simply put, the performance of your applications is suffering.
  • Prior to ASP.NET, and, to a lesser extent, with it, you open yourself up to the possibility of SQL injection attacks because you are only using the statements above.
  • You are probably avoiding a good three-tiered architecture because it practically requires you to write stored procedures. This is making your code harder to maintain.
  • You are probably using the SqlDataObject for your data binding. As a result, you are frustrated with the errors this is causing you in your updates that you have very limited ways of tracking down.
  • By refusing to learn the DDL portion of SQL, you are limited in how you can version your database. If you learn DDL, you’ll be able to version your database schemas in a similar manner to how you version your source code.
  • If you are writing DotNetNuke modules that access a database, you’ll need this information.
  • By learning SQL, your SQL will become less of a hack, making this part of your development effort more efficient.
  • Even if you have a DBA who is responsible for writing this code for you, wouldn’t it be helpful to be able to speak his language? I’ve been programming for 21 years now and I’ve only met one DBA who knows more than I do about SQL. Considering that I would not consider myself an expert in SQL this reflects poorly on the DBAs that I’ve had to work with. What this means in practical terms is, you are a lot more likely to get the SQL code you want into your database if you can just hand it to your DBA and say, “Do this,” rather than asking for a stored procedure that does something. Code is the best specification.
  • Having a firm grasp of SQL will make you a more valuable programmer. This is the best reason of all.

Stick with me over the next several weeks and we’ll introduce some SQL that you can use in your daily programming life.

Related Post

5 Responses to “SQL For Developers – 9 Reasons to bother”

Leave a Reply

Comment Policy:

  • You must verify your comment by responding to the automated email that is sent to your email address. Unverified comments will never show.Leave a good comment that adds to the conversation and I'll leave your link in.
  • Leave me pure spam and I'll delete it.
  • Leave a general comment and I'll remove the link but keep the comment.

Notify me of followup comments via e-mail