If you work with SQL, you invariably come across questions like:

  1. What is a lateral join?
  2. When do I pick what kind of join?
  3. Rectangular join? What?
  4. What happens if you mix inner and outer joins together?

With simple practical examples, and visual represenation of the joins, Swanand Pagnis will cover:

  1. Why is it called a join and what exactly does it mean?
  2. The concepts behind “inner/outer” and “left/right” and how DB engines determine which rows will be in ResultSet.
  3. The technique of “one at a time” in building large, complex joins.

About the speaker: Swanand Pagnis is senior backend engineer, leader, and mentor, with a focus on web application development and relational databases. He has been using and teaching MySQL, PostgreSQL for over 10 years.

Participation: Zoom link will be shared with registered participants. Or, you can watch the livestream on this page.
Registered participants can leave comments/questions on the Comments section for the speaker to address during the session.

Contact details: For inquiries, call 7676332020 or email info@hasgeek.com. Follow @rootconf on Twitter or subscribe to https://hasgeek.com/rootconf

Hosted by

Rootconf is a community-funded platform for activities and discussions on the following topics: Site Reliability Engineering (SRE). Infrastructure costs, including Cloud Costs - and optimization. Security - including Cloud Security. more

Swanand Pagnis

@swanand

Fearless Joins: Just enough SQL to be effective

Submitted Aug 16, 2020

SQL joins strike terror in the hearts of some developers. Some others can write their out of them, but never truly grok them and get stuck when things go wrong. We will undo the damage done by that useless venn diagram. Yup, the same one you’re thinking of.

If you work with SQL, you invariably come across questions like:

  • What the hell is a lateral join?
  • When do I pick what kind of join?
  • Rectangular join? What?
  • What happens if you mix inner and outer joins together?

We aim to “decomplect” joins in this session i.e. build up an understanding of the invariants that are behind SQL joins, and work out any join clause using them. If you pay sufficiennt attention, by the end of the 30 minutes, you will be able to very confidently explain the difference between adding a condition in JOIN clause vs adding that same condition in a WHERE clause and when to use which construct. Amongst other things.

Outline

We roughly cover these main ideas:

  1. Why is it called a join and what exactly does it mean? Joins from first principles.
  2. The concepts behind “inner/outer” and “left/right” and how DB engines determine which rows will be in resultset
  3. The technique of “one at a time” in building large, complex joins

There will simple practical examples, and visual represenation of the joins.

Requirements

This is not a SQL primer. Prior experience in writing a query is needed. Experience with ActiveRecord, Django.DB is fine.
A willingness to unlearn and relearn is needed.

Speaker bio

Senior backend engineer, leader, and mentor, with a focus on web application development and relational databases. I have been using and teaching MySQL, PostgreSQL for over 10 years.

Comments

{{ gettext('Login to leave a comment') }}

{{ gettext('Post a comment…') }}
{{ gettext('New comment') }}
{{ formTitle }}

{{ errorMsg }}

{{ gettext('No comments posted yet') }}

Hosted by

Rootconf is a community-funded platform for activities and discussions on the following topics: Site Reliability Engineering (SRE). Infrastructure costs, including Cloud Costs - and optimization. Security - including Cloud Security. more