Relational databases are an essential piece of many modern solutions. Thus, most developers have some exposure to SQL within the first few years of their careers. Nevertheless, there are a few skills that separate database developers from others. These three areas make a significant difference between those that want to stick out from their peers.
Understand Joins (Inner, Outer, etc.)Relational databases are all about the relationships among data. That means you are limited in how you can utilize these tools until you can leverage the relationships as part of a query. Database relationships, at their most simple, will be among tables. That leads to joins. If you are struggling to understand how to join data from two (or more) tables, then you will struggle to retrieve the desired results. Thus, the best first step in mastering SQL and queries is to get comfortable with how joins work.
Complex Queries - The Where ClauseOnce you understand table joins, then the where clause is next. At its most basic, joins gather data for your query and the where clause filters that down to the exact desired results. These two areas are critical to your understanding to craft high performing queries. The where clause is more complicated though, as it tends to have more options and variations.
A where clause boils down to a logical expression. That seems to be why many people that struggle with where clauses hit a mental block. The full spectrum of and-or combinations and throwing in inner select statements can quickly overwhelm even the stoutest logicians. However, you can learn where clauses in steps. There are levels of complexity that will provide you the tools required for higher levels of data extraction. The good news is that these tend to have a reduced level of impact. Those first few tiers of where clause understanding can provide all you need for eighty percent (or more) of the requirements out there.
Stored Procedures and FunctionsIt is possible to do a lot of work with a database and never write a stored procedure or function. However, this is a skill that all database developers have. You cannot honestly call yourself a database developer if you lack the skills to code within the database. That means stored procedures and functions. These tools are not needed for every solution. Nevertheless, they can make a significant difference in the maintenance, scalability, and performance of an application. They are easily underestimated by those that do not understand them.
DBVisualizer How To – Easy Database Administration and Usage