Is there a way to say a column value should come from another table?
I have the following two schemas
And in the
weeks
table, I want to say that the year should come from the seasons
table. Is that something that's possible? Is that something that is advisable? I currently grab this information from an ESPN endpoint, but figured I should probably migrate this into my own DB so I don't rely on an endpoint that could potentially get blocked.1 Reply
Yes but not as a value. You can add a
seasonsTable
reference (foreign key) to weeksTable
if you want to link a week row with a given season row