Tag: sql

  • Understanding INNER, OUTER, LEFT, and RIGHT Joins in SQL

    Understanding INNER, OUTER, LEFT, and RIGHT Joins in SQL

    One of the first and most common things newcomers to SQL struggle with is how each JOIN is different from the other. In this article, I’ll explain the differences between the inner vs outer JOIN and left vs right JOIN in SQL using examples from each.

  • How to Implement Many-to-Many Relationships in Relational Databases

    How to Implement Many-to-Many Relationships in Relational Databases

    Nearly any data model of non-negligible complexity will include at least one (if not several) many-to-many relationships. This relationship emerges when, given two tables A and B, instances of A could have many instances of B, and instances of B could have many instances of A. Successfully implementing this relationship is a bit of stumbling…

  • SQL Server Indexing: Part 3 – Implementing and Testing Indexes

    SQL Server Indexing: Part 3 – Implementing and Testing Indexes

    In part 1 of this series, we learned about the basics of indexes, what they do, and what they’re for. In part 2, we talked about query plans. We learned about reading query plans so that we could understand how SQL Server goes about retrieving the data we ask for. This is an important first…

  • SQL Server Indexing: Part 1 – Understanding Indexes

    SQL Server Indexing: Part 1 – Understanding Indexes

    Database indexing, often the go-to solution to database performance issues, is a much more complicated than we realize at first thought. The solution to just “slap an index on the column” is not optimal, and often times may even harm performance more than help. Before we get too deep into how indexing works, lets talk…

  • How To Work With Memory Optimized Objects in SQL Server

    How To Work With Memory Optimized Objects in SQL Server

    Good morning everyone, today I’m going to show you how to make memory optimized tables and natively compiled stored procedures. First, I’ll talk about why you might want to use these things, then we’ll just dive straight in to how to do it. Relevant Video If you don’t feel like reading all of this, I…