Is there an answer matrix I can use to decide if I need a foreign key or not?

Abaddydeelo

New Member
For example, I have a table that stores classes, and a table that stores class_attributes. class_attributes has a class_attribute_id and a class_id, while classes has a class_id.I'd guess if a dataset is "a solely child of" or "belongs solely to" or "is solely owned by", then I need a FK to identify the parent. Without class_id in the class_attributes table I could never find out to which class this attribute belongs to.Maybe there's an helpful answer matrix for this?
 
Top