Today I have this structure…
tableA.id
tableB.id
tableB.tableAId (fk)
tableC.id
tableC.tableBId (fk)
Is it correct I put a fk in tableC refering to tableA ? If I dont do that, I need to join tableC with tableB to go to tableA. I am telling to avoid joins and going to do all with the good pratices.
Multiple foreign keys is in no way a bad thing to do. If there’s a relation between table A and table C, and you’re going to need to pull data that relates to both without necessarily needing table B, having a foreign key between A-C is perfectly fine!