SQL Joins Visualizer
Written by Kay Ewbank   
Thursday, 08 January 2015

If you’re learning SQL (or teaching someone else), working out which Join you need can be confusing. A newly released open source utility provides both explanations and code.

 

sqljoinviz

 

SQL Joins Visualizer is an open source app that lets you click on sectors in a Venn diagram to choose how the tables should be combined. ANSI-standard SQL specifies five types of JOIN: INNER, LEFT OUTER, RIGHT OUTER, FULL OUTER and CROSS. You can also create a self-join to join a table to itself.

When you’ve clicked on the segments, the SQL Joins Visualizer shows you the SQL that corresponds to your selection, and you can copy and paste it if you need the SQL code elsewhere. The app also gives you a description of the join you’ve created. So, for example, if you click on the right-hand segment and the central segment, you get a description telling you that a “Right (outer) join produces a complete set of records from Table B, with the matching records (where available) in Table A. If there is no match, the left side will contain null”.

You also get the SQL:

SELECT * FROM TableA A
RIGHT JOIN TableB B ON
A.key = B.key

This is a very simple app, but it would be a good teaching aid. It is available online, and will also work offline

sqljoinvizsq

 

You can read more about the app and SQL joins in general in a post on the Leopard blog from the app’s author, Alexey Vasiliev.

 

More Information

SQL Joins Visualizer

Related Articles
T-SQL Join Types In SQL Server Pro's June Issue

 

To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, FacebookGoogle+ or Linkedin,  or sign up for our weekly newsletter.

 

Banner


Grafana 11 Improves Metrics
11/04/2024

Grafana Labs, creators of the Grafana open-source metrics analytics and visualization suite, has announced the preview release of Grafana 11 with improvements to make it easier to view metrics, and ch [ ... ]



The WinterJS Javascript Runtime Is Asking For Your Attention
11/04/2024

WinterJS is a brand new Javascript runtime by Wasmer which comes with the claim that it's the fastest of them all. Let's find out if that holds true.


More News

 

 

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Friday, 09 January 2015 )