Learning SQL – An Interview with Mark O’Donovan
This is the first of several interviews I’ve conducted with those influencing the SQL community. My goal is that through their insights your journey to learning SQL is made easier. In this post I’m interviewing Mark O’Donovan. Mark has written several books on SQL and has over 17 years in the industry. Now days you’ll see him helping users within the business intelligence communities. I’ve included mark’s biography at the end of this post.
Before we begin, I want to remind you all that if you have other questions you want answered, then post a comment or tweet me. I’m here to help you.
With that let’s begin the interview!
1. Many people that I know that want to learn SQL don’t know where to start. What are your suggestions for getting quick success with SQL?
As a starting point I would learn how to create a table of data maybe using the GUI and then carry on to the basic SQL statements such as SELECT, UPDATE and DELETE and finally INSERT.
Once you are comfortable with the basic SQL statements they you can move onto other aspects of SQL development such as Views, Joins and Normalization.
As with learning any subject it is a balance between firstly making the topic such as SELECT statements interesting enough so that you don’t get bored of the whole subject and decide to do something different.
Secondly you also need to make sure you don’t progress to the next topic such as UPDATE statements before you are comfortable with the current topic i.e.: trying to run before you can walk.
One way to make sure you are progressing at the right pace is to test yourself by writing down a task to complete such as updating some rows in a table and then put away the book and close down your web browser until you have completed the task.
Then only if you get really stuck can you refer back to Google or your book.
The key is to not complete the task you have set yourself with your book or web browser open.
Testing yourself in this way takes some practice but is well worth it if you want to gain confidence in using SQL.
The problem with learning SQL is that it can be a very open-ended topic so the other key is to choose subject for the data you have some interest such as details of music you like.
2. Database normalization can be intimidating, yet essential to understand why relational databases are what they are. When do you recommend that a beginner learn to understand normalization?
When you are happy with the basic commands and are starting to create databases with more than one table that have fields that are related it is a good time to start learning normalization.
For most people working through the normal forms starts with learning topics such as creating primary and foreign keys.
I would say it is best to start learning about normalization when you have at least 6 months experience of SQL rather than leaving it till you are working in a company and need to look at normalization because you are starting to experience problems with your SQL database.
3. If you were to start over learning SQL, what are three things you would do differently?
I would try to get an understanding of performance tuning early on especially with when to use functions.
Early on I remember using functions too much in large SQL select statements, this was fine to start out with but as the data that the SQL select used grew the statement took longer and longer to execute.
Learn from others:
Start looking at forums such as those on www.SQLservercentral.com to see the kinds of questions SQL developers are asking as a learning task.
Show others the benefit of SQL:
Look at ways you can use SQL such as learning SSRS (SQL Services Reporting Server) to create reports or learning qlikview earlier.
If you are using SQL in a company you can show users and your boss the benefit of SQL and with products such as SSRS and qlikview.
4. Do you have any good T-SQL based resources you would like to share?
Here a couple of resources I’ve found handy:
- A good place to start to learn SQL: http://www.w3schools.com/SQL
- A great site which is very popular which is important when it comes to forums: http://www.SQLservercentral.com/
- Some great podcasts, loved the ones on powershell and SQL server: http://midnightdba.itbookworm.com/
- Some good performance tips: http://www.brentozar.com
Last but not least the F1 key, love the way from SSMS (SQL Server Management Studio) you can just highlight the command and press F1 and be taking straight to the webpage for that command.
5. When you first learned SQL what were some of the pitfalls you struggled through. How do you overcome them?
As I mentioned earlier the overuse of functions, in this case it did not have the time to change the query and just had to put up this the delay until the system was no longer in use. I was lucky that the query had to be run only once a month but it forced me to look into SQL query optimization.
Not creating more reusable code:
When starting to develop with SQL you start to type SQL statements out more and more.
As you progress you start to learn to use store procedures, code snippets, templates or create your own files with examples of SQL statements that will help you develop SQL faster without reinventing the wheel each time.
Learning from the mistakes of others:
If you take part in forums people are more often than not happy to help as they remember what is was like to start learning a subject such as SQL development.
Finally, remember that even if you are the only SQL developer in your company you can make useful contacts through SQL forums and more often than not any problem you are currently experiencing will have been solved by someone else already.
Mark O’Donovan has been working within the IT industry for over 17 years within IT support and developer roles. For over 6 years Mark has been focussed on business intelligence applications such as Microsoft BI and QlikView.
Mark has always had an interest in visualization.
In 1996 Mark completed a Masters thesis called ‘Towards a methodology for visualizing quantum computing’.
Currently Mark as a QlikView Developer in London, is the author of 2 books on QlikView and 1 book on SQL development and manages the website http://www.techstuffy.com.
Please checkout his book “Practical Sql – Microsoft Sql Server T-SQL for Beginners.“
Remember! I want to remind you all that if you have other questions you want answered, then post a comment or tweet me. I’m here to help you.