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 |
|
bob123
Starting Member
16 Posts |
Posted - 2006-09-14 : 22:34:33
|
| sql server 2005sql server mangement studioHi I am using the databse diagrammer to create a database.creating the tables and fields is no problem but there seems to be a lack of choice with joins and I cannot see how to set cardinality.any help appreciated.B |
|
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2006-09-15 : 00:55:31
|
| The diagrammer lets you edit the database in diagram mode rather than creating a true ER diagram. So, you don't specify cardinality, what you do is create foreign key relationships (which are always 1:M). Just drag the foreign key column from the child table and drop it on the parent table. That will create a foreign key dependency from that column to the primary key in the parent table.To create a M:M relationship you need to create three tables with the appropriate foreign keys:eg. M:M between table A and table B requires table C, with a 1:M from A to C and a 1:M from B to C. |
 |
|
|
|
|
|