By using this site, you agree to the Privacy Policy and Terms of Use.
Accept
SmartData CollectiveSmartData Collective
  • Analytics
    AnalyticsShow More
    analyst,women,looking,at,kpi,data,on,computer,screen
    What to Know Before Recruiting an Analyst to Handle Company Data
    6 Min Read
    AI analytics
    AI-Based Analytics Are Changing the Future of Credit Cards
    6 Min Read
    data overload showing data analytics
    How Does Next-Gen SIEM Prevent Data Overload For Security Analysts?
    8 Min Read
    hire a marketing agency with a background in data analytics
    5 Reasons to Hire a Marketing Agency that Knows Data Analytics
    7 Min Read
    predictive analytics for amazon pricing
    Using Predictive Analytics to Get the Best Deals on Amazon
    8 Min Read
  • Big Data
  • BI
  • Exclusive
  • IT
  • Marketing
  • Software
Search
© 2008-23 SmartData Collective. All Rights Reserved.
Reading: Joining Multiple Sources 101: Inner and Outer Joins
Share
Notification Show More
Aa
SmartData CollectiveSmartData Collective
Aa
Search
  • About
  • Help
  • Privacy
Follow US
© 2008-23 SmartData Collective. All Rights Reserved.
SmartData Collective > Data Management > Joining Multiple Sources 101: Inner and Outer Joins
Data Management

Joining Multiple Sources 101: Inner and Outer Joins

Eran Levy
Last updated: 2015/02/17 at 5:30 PM
Eran Levy
6 Min Read
SHARE

Mashing up multiple data sources to generate a single source of truth is an integral part of data analysis. It allows you to compare and cross-reference records stored in different formats and locations, and to perform queries and calculations. This article will run you through some basic concepts in data analysis that you should become familiar with when joining data stored in multiple tables.

Contents
Why do I need to know this?What’s a Join? And isn’t that a verb?Inner JoinsUsed for connecting identical fieldsOuter JoinsUsed for connecting common, but not identical fieldsRow Level Joins vs. Summarized ViewsIllustration:Learn more about mashing up data sourcesDownload our free white paper: The Data Mash Up Cheat Sheet (direct download, PDF)

Mashing up multiple data sources to generate a single source of truth is an integral part of data analysis. It allows you to compare and cross-reference records stored in different formats and locations, and to perform queries and calculations. This article will run you through some basic concepts in data analysis that you should become familiar with when joining data stored in multiple tables.

Why do I need to know this?

Short answer: In most cases, you don’t. If you’re using a strong business intelligence tool and working with simple datasets, the bulk of the data preparation process should be handled by the software itself. However, it’s useful to understand how your data is transformed in the process and how the new, combined data will look in tabular form. Additionally, you might need this info when working with more complex data.

So let’s get started!

More Read

data breaches

How Hospital Security Breaches Devastate Local Communities

Data Ethics: Safeguarding Privacy and Ensuring Responsible Data Practices
Tips to Protect Office 365 Systems from Data Breaches
The Importance of CSRD Data for EU-Operative Businesses
Google Report Shows Android Users Need VPNs for Data Privacy

What’s a Join? And isn’t that a verb?

In the context of SQL and database management, a join is a way of combining records from multiple tables. A join requires common fields between the two tables in order to form a logical connection, and is the basis for combining different data sources and an integral part of data analysis.

Inner Joins

Used for connecting identical fields

An inner join is used to connect two or more tables that contain fields with identical records. For example, if we look at an example of two tables:
image1


These two tables would be combined via an inner join based on the common field – Product. The result would be one table which contains data from the previous two:
image2


If one of the tables contained a record that does not appear in the other (e.g. if the Product-Stock table would contain a fourth row with details of banana stock), that data would be disregarded.

Outer Joins

Used for connecting common, but not identical fields

Outer joins are divided into left, right and full joins. To understand the difference between the two, let’s once again look at two tables:
image2.1


As you can see, there is no column with completely matching records between these two tables. There are three main ways we can go about combining this data:

    • Left join: Generates a table that contains all the records from the lefthand table, along with any matching records found on the righthand one. In our example:

image2.2

    • Right join: Same as left join, but will contain all records from the righthand table.
    • Full outer join: Will essentially perform both a left and right join, combining the two tables despite any records not matching, e.g.:

image3

These are the main types of joins you’re likely to encounter. Each might be used in different scenarios, depending on the analyses you will want to perform on the combined data.

Row Level Joins vs. Summarized Views

Business Intelligence software tools have two different ways of joining multiple tables:
A row level join means that after two data sets are combined, the original records are still kept within the data model and accessible. This, once again, is a question of the strength and sophistication of the engine that powers your analytics tool: A robust one should be “smart” enough to understand the data and model it in such a way that will allow you to drill down into the full granularity of your data, as it was before the tables were joined.
In contrast, BI software that relies on a less powerful back-end will instead create a summarized view of the data by aggregating it, thus compromising its granularity. The guiding line should be this: can you easily access the original, row-level details of your data after the join is performed? If the answer is no, your BI software might be lacking in terms of its mash-up capabilities.

Illustration:

image4

Learn more about mashing up data sources

Read a quick guide covering:

  • Joins vs. aggregations
  • Avoiding many to many relationships
  • Joining data sources with BI software

Download our free white paper: The Data Mash Up Cheat Sheet (direct download, PDF)

Eran Levy February 17, 2015
Share This Article
Facebook Twitter Pinterest LinkedIn
Share

Follow us on Facebook

Latest News

data breaches
How Hospital Security Breaches Devastate Local Communities
Policy and Governance
analyst,women,looking,at,kpi,data,on,computer,screen
What to Know Before Recruiting an Analyst to Handle Company Data
Analytics
data perspective
Tackling Bias in AI Translation: A Data Perspective
Big Data
Data Ethics: Safeguarding Privacy and Ensuring Responsible Data Practices
Data Ethics: Safeguarding Privacy and Ensuring Responsible Data Practices
Best Practices Big Data Data Collection Data Management Privacy

Stay Connected

1.2k Followers Like
33.7k Followers Follow
222 Followers Pin

You Might also Like

data breaches
Policy and Governance

How Hospital Security Breaches Devastate Local Communities

7 Min Read
Data Ethics: Safeguarding Privacy and Ensuring Responsible Data Practices
Best PracticesBig DataData CollectionData ManagementPrivacy

Data Ethics: Safeguarding Privacy and Ensuring Responsible Data Practices

7 Min Read
office 365 data protection
Risk Management

Tips to Protect Office 365 Systems from Data Breaches

9 Min Read
The Importance of CSRD Data for EU-Operative Businesses
Policy and Governance

The Importance of CSRD Data for EU-Operative Businesses

7 Min Read

SmartData Collective is one of the largest & trusted community covering technical content about Big Data, BI, Cloud, Analytics, Artificial Intelligence, IoT & more.

AI and chatbots
Chatbots and SEO: How Can Chatbots Improve Your SEO Ranking?
Artificial Intelligence Chatbots Exclusive
data-driven web design
5 Great Tips for Using Data Analytics for Website UX
Big Data

Quick Link

  • About
  • Contact
  • Privacy
Follow US
© 2008-23 SmartData Collective. All Rights Reserved.
Go to mobile version
Welcome Back!

Sign in to your account

Lost your password?