3 ms·
Oh yeah, that is a "natural join". Problematic since it depends on the names of the columns. I can see how it is convenient though. I would like something like
by goto11 6y ago
Oh yeah, that is a "natural join". Problematic since it depends on the names of the columns. I can see how it is convenient though. I would like something like this, just based on declared foreign key relationships rather than column names.
- doublesCs 6y agoI could say the same thing about your suggestion: Problematic since it depends on what you set as primary/foreign key. I can see how it is convenient though.
- nsonha 6y agoForeign key is a formal semantic while same column name is just a convention
- goto11 6y agoWhat is problematic about that? Column names are just names, there is no guarantee that value in one table corresponds to a value in another table just because the columns have same name. Private/foreign key declarations enforces consistency so it is not possible to have an orphan foreign key.