Help

How to implement Complex key

Topic Labels: Base design
1902 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Ron_Carr
4 - Data Explorer
4 - Data Explorer

I want to create a database that has a master table with one key column, but subsequent child records have primary keys of 2 columns, with one of those relating back to the master table. This is standard relational design, but I don’t see whether I can implement this of not. This would have to be supported in a form so that I can see all of the records in a child table related to one record in the master table. Can I do this? How?.

1 Reply 1

Welcome to the Airtable community!

Airtable handles relationships between tables differently from traditional relational databases. Airtable does not have user defined primary keys or foreign keys. Instead Airtable has linked record fields that are stored with an internal record id that is set by Airtable and cannot be changed. All linked records need to be explicitly linked, either manually or through code.

This may be a very different way of thinking about data from what you are used to.

Short answer: foreign keys and primary keys won’t work in Airtable the way you are used to.