SQL For Developers – 9 Reasons to bother
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.
Other post in SQL For Programmers
- SQL For Developers - 9 Reasons to bother - August 13th, 2008
- MSSQL CREATE and DROP Database - SQL for Programmers - August 20th, 2008
- MSSQL CREATE TABLE - SQL For Programmers - August 22nd, 2008
- SQL For Programmers - ALTERing the TABLE - September 1st, 2008
- SQL For Programmers - Finding a String - September 3rd, 2008
- SQL For Programmers - Finding IN a List - September 8th, 2008
- SQL For Programmers - Stored Procedures (Better than LINQ) - September 10th, 2008
- SQL For Programmers - Stored Procedure Basics - September 16th, 2008
- Basic SQL Commands - SQL For Programmers - September 18th, 2008
- SQL IF/WHILE Blocks - SQL For Programmers - September 30th, 2008
- SQL WHILE - SQL For Programmers - October 2nd, 2008
- Temporary Tables - SQL For Programmers - October 7th, 2008
- SQL CURSOR - SQL For Programmers - October 13th, 2008
- SQL CURSOR Performance - SQL For Programmers - October 22nd, 2008
- Random in SQL - SQL For Programmers - November 4th, 2008
- SQL - Filtering WHERE condition on two rows - November 26th, 2008
- SQL - Transactions - April 15th, 2009
- SQL For Programmers – New Question - July 6th, 2009
- SQL SELECT CASE Instead of IIF - October 20th, 2009
Other Related Items:
Tsubo Women's Lerna WedgeLeather and textile upper withvalcro for a great fit.Durable rubber sole.Platform heel makes it comfortablefor walking.2 3/4" heel.
78 8846 Northstar 4.5" Talking Reflector Telescope900 X 4.5" Motorized Reflector Telescope Real Voice Output (tm) (rvo) Describes The Night Sky In A Human Voice 1.25" Eyepiece Power-boosting Barlo... Read More >
Beginner's SQL Server 2000 T-SQL Programming on DVDLearn SQL Server 2000/TSQL Programming as you watch DVDs on your TV or laptop DVD player. This 2-disc set contains 7 lessons that provide you a revi... Read More >
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!










[...] SQL for Developers – 9 Reasons to Bother (Dave M. Bush) [...]
SQL For Developers – 9 Reasons to bother…
[...]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…
I totally agree with this. Before my current job SQL was something I knew about, and could write if I needed to but didnt really have a firm grasp of.
All of a sudden I was writing SQR reports with upto 3 A4 pages of SQL. I learnt all sorts of tricks for getting SQL to do things and basiclly improved my understanding beyond all recognition.
I have since moved away from SQR but when looking at and SQL now I am thinking of performance and how to improve it. Frankly it was one of the most useful things I have done.
[...] The .NET Answers blog gives us 9 Reasons a developer should learn SQL. [...]
[...] SQL For Developers – 9 Reasons to bother – August 13th, 2008 [...]