Episode 70: Know Your Joins
Podcast: Play in new window | Download
How well do you know your database joins? This episode we talk about the different kinds to help make you a join master.
News and Follow-ups – 00:48
- Mark’s tinfoil hack failed
Geek Tool – 03:28
Webapps – 09:48
- Penzu – Online private journal
- Support Details – Online provider of simple support data
Topic – 18:25
- Combines records from two or more tables in a database
- A general rule of thumb is that database joins are faster than doing separate select statements in code.
- Ansi Standard lists 4 types:
- Inner
- Join tables based on a common column Eg. PK/FK
- Most common type of join
- Outer
- Combine all rows of one table with only matching rows on the other table
- Left
- Return all rows on the left table even if not in the right
- Right
- Return all rows in the right table even if not in the left
- Cross join
- Takes two tables and combines every row in table b with every row in table a.
- 1000 row table would produce 1 million rows
- Why make one then?
- Suppose you want a grid of articles of clothing
- select size, color from sizes cross join colors
- MySQL University
- A visual explanation of sql joins
May 25th, 2010 at 8:54 am
It does take a few hours to get use to the Magic Mouse but it is awesome. It is work of art.
I would imagine most young programmers don’t know their joins very well since ORMs are pretty much the standard now.
May 25th, 2010 at 11:02 am
Agreed, i just bought an invisible shield for it so I don’t scratch it
Yeah, like we said in the episode it’s easy to get around using the correct join, but no where near as efficient! Gotta learn em!
May 25th, 2010 at 11:21 am
Where did you get the shield at?
May 25th, 2010 at 11:40 am
Zagg’s InvisibleShield: the only thing I use
http://www.zagg.com/invisibleshield/apple-magic-mouse-cases-screen-protectors-covers-skins-shields.php
May 26th, 2010 at 6:41 am
Never heard of Zaggs. They have some cool stuff. May have to get a cover. I have had my mouse for a few months and it doesn’t have any scratches.