Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jonekim
Starting Member
35 Posts |
Posted - 2012-04-23 : 20:28:02
|
student table:stud_namestud_regNum(PK)course table:course_code(PK)course_namethis relationship is many to many so I created a bridge table.marks tablestud_regNum(FK)course_code(FK)markswhen I draw database diagram, it do not show foreign key relationship between these three tablesonly the relationship b\n any two tables is shown. why is it so?do ms sql server 2005 do not allow foreign key relationship from two or more tables? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
vinu.vijayan
Posting Yak Master
227 Posts |
Posted - 2012-04-27 : 06:50:27
|
quote: Originally posted by jonekim student table:stud_namestud_regNum(PK)course table:course_code(PK)course_namethis relationship is many to many so I created a bridge table.marks tablestud_regNum(FK)course_code(FK)markswhen I draw database diagram, it do not show foreign key relationship between these three tablesonly the relationship b\n any two tables is shown. why is it so?do ms sql server 2005 do not allow foreign key relationship from two or more tables?
stud_regNum(FK) Refernces stud_regNum(PK) which is in "StudentTable" and course_code(FK) References course_code(PK) in "Course Table".Right???quote: only the relationship b\n any two tables is shown
This is because at a time there is only relation between two tables:1. "marks table" is related to "StudentTable" via stud_regNum(FK).2. "marks table" is related to "Course Table" via course_code(FK).The tables "StudentTable" & "Course Table" are separate Master Tables and are not related to each other.This is why a three way Relationship is not shown in th Database Diagram.N 28° 33' 11.93148"E 77° 14' 33.66384" |
 |
|
|
|
|