Help

Re: Is it possible to link across multiple tables?

821 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Dennis_Sutch
4 - Data Explorer
4 - Data Explorer

I have tables that I’d like to link through. For instance, I may have a tables for car manufacturers, models, and owners. The car manufacturers are linked to models, and models are linked to owners. Is there a way to see all owners for each manufacturer and see all manufacturers for an owner?

2 Replies 2
Katherine_Duh
Airtable Alumni (Retired)

Hi Dennis,

If I understand your question correctly, I think you’re asking about many-to-many relationships. Each manufacturer could have multiple owners who’ve purchased models of cars from them, and each owner could have purchased multiple models of cars from different manufacturers. To represent this relationship, you need to have a junction table, which in this case is the models table, which links to both the owners and manufacturers.

You can get information from the Owners table to the Manufacturers table using rollup fields. Here’s a table I’ve mocked up following your instructions:
c2d9af43edf5269358e30e6fd8930082b33fde80.png
This Models table has links to the Manufacturers and to the Owners.

Now, let’s look at the Manufacturers table:
082a7ad9dcd439e128660c28e08c3e8dfc2fd614.png
The rollup field on the right is set up to look at a particular linked field in your table and draw information from the other table to which the field has been linked. It’s set up like so:
08b49580a50a473f05d19995d74e86abc77f8388.png
This means that this field looks at the Models field here, then goes to look at the table to which it’s been linked (which in this case is also titled “Models”), then returns the value found in a specified field in the Models table (in this case, the “Owners” field). The ARRAYUNIQUE aggregation function is there to ensure that you don’t have repeats of owners’ names (e.g., in this example, Andrew owns two different Lamborghini models, but his name only shows up once).

You can do something similar in the Owners table as well:
b7a9dbe6430226bcd7a772e59a2b7a1421758451.png
32ea3290ddee5db52018e5fed4c725a716561d2e.png

Hope this answers your question!

You are correct, I am attempting to implement a many-to-many relationship. This is exactly what I needed. Thank you!

This brings up additional questions related to having relationships across more than three tables and other functionality available with many-to-many relationships. Is there documentation available on these types of features?