From the course: SQL for Testers

What is SQL and why use it as a tester? - SQL Tutorial

From the course: SQL for Testers

Start my 1-month free trial

What is SQL and why use it as a tester?

- [Instructor] SQL is everywhere. Almost every application on the web use a structured query language to create and query databases. There's some big data applications and other technology that's moved on to other ways of managing their data, but for the vast majority of websites, SQL remains the backbone of how they use and store data. The very fact that it's so popular, means that as a tester, you should know something about it and how it works, generally, testers don't need to be able to create production code, but understanding how technology works will help you improve your testing of that technology. There's additional benefits as well for testers, so some test scenarios are difficult or time-consuming to set up if you have to do everything with the UI, or even with UI automation. For example, if you use selenium to do this, that could be helpful, but those kinds of scripts can take some time to write and can be a bit difficult to maintain. So sometimes the fastest way to do things is just go right to the database and create or modify the data that you need. Another benefit that comes to testers that know SQL is an improved ability to debug issues. Sometimes it's difficult to understand why something's gone wrong, but if you're able to query the database, you might discover some data corruption or some inconsistencies or some other things that you could do to figure out what is actually going on and what went wrong with the problem. I've used this kind of query myself to track down strange issues that clients were seeing that I wasn't able to reproduce locally, and even just to more easily test fixes on issues that involve things like data exports. Another benefit, too, for a tester to learn SQL is employability. If you're able to find some of these deeper problems, if you're able to be more efficient in setting up data in your testing, you'll end up being a more skillful and valuable tester. Of course, not every company is looking for testers that have strong SQL skills, but many do find that to be valuable. For example, in my interview for my current position, I was asked to show some simple SQL queries and being able to work with some of the basics of SQL only helped me in landing the job that I have. So we can see that there are a number of good reasons for testers to learn how to use SQL. But before we dive in, let's talk for a second about where SQL came from. So it was initially developed in the early 1970s, which means that it's actually about somewhere around 50 years old now. So in software years, I think that makes it, well, about as old as this guy here, but why does it continue to be so popular? Well, there's a few reasons. One is that relational databases are very good at expressing relationships in a system where those relationships change and evolve over time, and if you think about it, that pretty much describes any website or application from finance to eCommerce to gaming and everything in between. We've got some defined relationships that sit in place, but those relationships may morph and change a bit over time. So since SQL is designed to work with relational database access, it's a little wonder that it continues to be so popular. There are also, of course, some additional reasons for this as well that are good news for us. One is that it's simple to use. So there's obviously complexity that can come into SQL queries, and if you've ever looked at some production SQL queries, you might find it overwhelming, but the reality is that with just a few simple queries, you can leverage a ton of the power of this language, and it's quite easy to get started with and start using. Another reason for its popularity is that it's so popular. Now this sounds like circular reasoning, and maybe it is, but the reality is that SQL is everywhere, which is great because it means that there's tons of resources available to help you with almost anything that you might get stuck on. There might be people at your company, there almost for sure are, people at your company that are very good at SQL and understand how to use it and you can talk to them and ask them questions, and then, there's millions of SQL users on the internet. So anytime you hit problems with SQL, if you Google it, you will probably find an answer that can help you because it has been around for so long. It's so popular. So many people use it. There's just so many answers available. So for all of these reasons, this is a very popular language to use and a very beneficial language for testers to get into. So let's dive into it.

Contents