Posted on: 5/25/2011 6:40:12 PM | Views : 594

Hi everyone,
I hope I'm on the right forum (as I'm new to SQL)
I have a question that I haven't been able to find an answer to so far.
What is the best way to enforce a mandatory particiapation between two tables if the assosiation beween them is one-to-many?
Let's say there are two tables:
Club and Team.
 
Club:
ClubName(pk)
ClubAddress
 
Team:
TeamName(pk)
ClubName(fk)
 
By ensuring that ClubName is the foreign key in the Team I can enforce assosiation between those two tables from the "many" end, but how to enforce it from the "one" (Club) end?
I was thinkng of creatintg a trigger to check this, but I'm wary that it will end-up in a circle, as upon creating a new Club there will be no Teams assigned to it.
Any advices on it would be much appreciated!
 
...

Go to the complete details ...