Postgres foreign key to a foreign key Apologies for asking this like an interview question...
Say you have 3 tables A, B and C
A is huge
B references A’s primary key through a foreign key and is small
C wants to reference the data in B but doesn’t know how
Which of the following options seems better:

Add a column to C having a foreign key to B’s primary key which is a foreign key of A’s primary key
Add a column to C having a foreign key to A’s primary key directly
Something else...

The plan is for C to join with B using our new column, but which table should C reference?
My gut feeling is that on an insertion to C the constraint check will be faster if its referencing a smaller table but I'm not sure if that's how it actually plays out
Clarification: C is a subset of B and B is a subset of A and all proposed relations are 1:1
If A is in one-to-zero-to-one relation with B, then B inherits its primary key from A:

If B is in one-to-zero-to-one relation with C, then C inherits its primary key from B, which is the primary key of A:

Nothing out of sort here, this is perfectly acceptable.