18th Nov 2022 7 minutes read I’m a Software Developer. How Do I Learn SQL? Alexandre Bruffa sql software development What do you need to know about relational databases and SQL as a software developer? In this article, we’ll explain the topics you need to know and how you can acquire this knowledge. If you are a software developer, you may have noticed that SQL skills are often required in some development roles. Although you are not a database manager or a data scientist, you will need solid SQL foundations to continue your developer journey. Online courses are an obvious choice for learning SQL. I sincerely recommend our SQL Basics course for beginners or our SQL from A to Z track for people who want to learn everything SQL has to offer. Our courses combine knowledge with hands-on practice; you can write SQL queries in the interactive console and get instant feedback. All you need is the Internet and your favorite browser. Why Is SQL Necessary for Software Developers? SQL is a programming language used to communicate with relational databases and other data technologies. Even if you don’t use relational databases, your data technology of choice likely understands SQL as a query language. Moreover, relational databases are a very mature and stable technology and are used in many software projects. Your main technology may be different, but there is probably a relational database somewhere in your project; it’s good to know the basics of how to work with them. Let’s see some practical cases where you will have to know SQL. Imagine that you are creating some endpoints in Python and using Django as a framework. For convenience and security, you decided to use the Django ORM (object-relational mapper) to manage queries to the database. Django gives you a database-abstraction API that lets you create, retrieve, update and delete objects. In other words, it allows you to write Python code instead of SQL queries. That’s great, but the ORM is actually executing SQL queries under the hood; this tends to be slower than classical SQL queries. So in some cases, you’ll have to write raw SQL queries in the ORM for the program to perform efficiently. Or perhaps you’re working in an eLearning company as a software developer. Customer service tells you that they’ve received complaints that customers with a certain plan cannot redeem coupons. To measure the potential impact and find a workaround, you first want to check how many users have been affected and if the plan they have is related to the issue. To do this, you’ll have to perform complex SQL queries over many tables in your database. Let’s see another case where you will need to know SQL. Your boss (the product owner) asks you to check how the new feature you implemented last week is performing in the production environment. Oh, it’s certainly the product owner’s job, but you are very interested in product management (and you don’t want to disappoint your boss), so you use Metabase to get the information you need. Its graphical interface allows you to select data from your relational database and visualize it in a very cool way. However, in some cases, you will need to perform complex queries that the tool can not handle. Once again, you will have to write raw SQL queries to fulfill the task. What Do Software Developers Need to Know About SQL? First of all, you will need to know the syntax of SQL. Note that SQL is also known as Standard Query Language. It has multiple dialects aside from the standard SQL, such as PostgreSQL, MySQL, MS SQL Server, Oracle, and many others. Don’t be afraid! All SQL dialects are very similar, and you can easily switch from one to another. SQL is generally an easy language to learn: the syntax is clear and intuitive and the learning curve is relatively short. Then, you will need a solid foundation of basic SQL query concept. You need to know how to retrieve data from one or more tables, how to filter the data by a desired criteria (e.g. a range of dates), or how to show data in a specific order. You will also need to know how to insert new data in a database and how to modify current data. Once you know how to manipulate data, you can learn how to modify the database structure: how to create a new database, table(s), or column(s) and how to modify the existing structure and work with constraints. Finally, you need to know the basics of creating your own functions. So, let’s talk about a learning path that covers the basics of what each software developer should know about SQL and relational databases. Overview of a LearnSQL.com exercise LearnSQL.com’s SQL Learning Path for Software Developers In this section, I will propose a learning path for software developers based on LearnSQL.com’s courses. The Fundamentals ➡️ SQL Basics course: Let’s begin with the basics! This course will give you fundamental SQL training, starting from scratch and covering the most important SQL topics. At the end of this course, you will be able to efficiently retrieve data from a relational database using relatively straightforward queries. ➡️ How to INSERT, UPDATE, or DELETE Data in SQL: This course teaches INSERT, UPDATE, and DELETE operations, which allow you to add, modify, and remove data from a database. Knowledge of these operations is essential to any software developer. ➡️ Standard SQL Functions: This course teaches the most important SQL functions. It covers text, numeric, and date and time functions, as well as functions that deal with NULLs. It covers functions that are in the SQL standard, so most SQL databases have these functions or very similar ones. Familiarity with SQL functions is essential for any software developer. Are you interested in the courses above? Get them all! The three courses form the “SQL Fundamentals” track, this is a perfect track to acquire a solid foundation in SQL. Creating Database Structure ➡️ The Basics of Creating Tables in SQL: This course will teach you about database tables, primary and foreign keys, and mandatory columns. You’ll learn how to create and modify a table structure. ➡️ Data Types in SQL: This course will teach you the basic data types in a SQL database, including text, numeric, date and time, and Boolean data types. You’ll also learn how to modify column data types. It will explain how a database generates ID values via identity columns and sequences. This course is based on the SQL standard, so most SQL databases are compatible with the data types it discusses. ➡️ SQL Constraints: This course takes a deep dive into primary and foreign keys as well as the UNIQUE, NOT NULL, CHECK, and DEFAULT constraints. These constraints are available in all standards-compliant SQL databases. ➡️ Working with Views: This course teaches you about SQL views and how to create, modify, and remove them. ➡️ Understanding Indexes: This course teaches you the basics of SQL indexes, which are data structures that help your database run queries faster. Together, these five courses will teach you the basics of working with tables and other database objects. This knowledge is essential for any software developer who works with databases. Are you interested in taking all of them? They form our Creating Database Structure track. The Final Course ➡️ Writing User-Defined Functions in PostgreSQL: The final course in our SQL learning path for software developers will teach you how to create user-defined functions (i.e. a function created by a database user) in PostgreSQL. Such functions can be used as a built-in function in a query; they allow you to extend the functionality of a SQL database. User-defined functions are not part of the SQL standard, but they are very similar for all dialects. Learn SQL Today! For a software developer, SQL is a required skill. Are you ready to begin your SQL journey? Our platform gives you access to all the necessary resources to become a SQL master. And maybe you’re wondering if there is a related career. Sure, you can become an SQL Developer! I strongly recommend you read this excellent article on becoming an SQL developer for more info. Don't hesitate any longer – learn SQL with us! Tags: sql software development