database - Is it good to have foregin key reference to all the tables (indirect references)? -
its simple scenario :
university table
univ_idn name 1 ut
university campus table
campus_idn name 1 ut austin 2 ut arlington
event registration table
event_idn campus_idn univ_idn 1 2 1 2 1 1
event @ point of time concerned campus_idn , not univ_idn directly . although makes sense , required have univ_idn in event registration table or should have campus_idn in terms can univ_idn ? how db's designed ?
i think need univ_idn column in university campus table:
campus_idn name univ_id 1 ut austin 1 2 ut arlington 1
then event registration table doesn't need univ_id column: can find out university campus table.
Comments
Post a Comment