Reputation: 595
I am new with Management Studio. I built relation between these two tables, but how to set integrity rules on them, like many-to-one, or many-to-many?
tables http://www.imageupload.org/thumb/thumb_98396.png
http://www.imageupload.org/?d=5862C4631 here is download link for pictre.
Upvotes: 2
Views: 2914
Reputation: 11283
When you create the link between columns, the relationship dialog that appears will allow you to specify which table is the Primary key table and which is the foreign key table. The primary key table is the "One" the foreign key table is the "Many".
In the diagram you provided, the Key icon shows which side is the "One" while the infinity icon shows which side is the "Many"
I don't think you can create a many-to-many relationship directly between two tables. In order to do that you have to create an intermediate table that sits between the two related tables.
Upvotes: 2