Primary key unique?

712 3
Showing results for 
Search instead for 
Did you mean: 
6 - Interface Innovator
6 - Interface Innovator

This is probably a stupid question but when designing a table, should the primary key (first column) be unique or not?

In my case, I have Projects and Tasks like
Projects (Fix House, Fix car)
Tasks (Repair bathroom sink, buy new steering wheel, replace lug nuts)
Should the primary key be the Projects or the Tasks? In other words, should the table design look like?



3 Replies 3

In general, it is good practice to have a unique primary field. However, Airtable does not require this.

Note that the primary field (first column) is not the same as a primary key.

If you think that you will have several projects with multiple tasks, you might want to have a two table system, one table for projects and another for tasks. Then join the tables with a linked record field.

@kuovonne Thank you. I should have clarified field vs key so thank you for that. What is the advantage to doing a two table system over a one table system? I always thought you’d want fewer tables where possible especially if the (in this case) tasks columns are all unique.

Take a look at this support article: