Create relationships between your data
Relationships are a way to link data from different tables for analysis. A relationship shows how two tables are connected by common fields, but it doesn't merge them into one. When tables are linked by a relationship, they stay separate and keep their own details and information.
Learning objectives
- Understand relationships
- Create data relationships
- Edit data relationships
What is the benefit of creating relationships between data?
To understand the benefits of creating relationships, let's take a look at an example. When you use a filter to filter any data, underneath the filters there are data columns connected.
Now, imagine you have two data tables called 'employee' and 'country'. The employee table has a column 'country_id' that contains the same values as the country table’s column called 'id'. The country table also has a column called 'name'.
Now, if you want to filter the employees by country, how do you do it? You create a filter and then create a field. There you select country name. Now you connect the field to the column called country.name.
If you are doing a query where you need to filter the employee on country. You know you have a filter field set to country name but how do you know that the employees table is connected to country. That is why you need to create a relationship, that shows you the connection between the data.
In next page we are going to walk you through, how you can create data relationships in Anlytic platform.