Jan J.
Jan J.

Reputation: 45

SSMS creating multiple foreign keys referring to one table

I am using SQL Server 2014 Express.

I am trying to create a database "clinic", which includes tables "patients" and "diseases". It is known that a person may suffer from more than one diseases, so my question is: is it possible to create multiple foreign keys - an array, for example, in the table "patients", which could refer to several "diseases" rows?

Upvotes: 0

Views: 73

Answers (2)

Braca
Braca

Reputation: 2805

You could use "junction table" for many-to-many relationships.

Upvotes: 1

rd_nielsen
rd_nielsen

Reputation: 2459

Per Microsoft: "the tree of cascading referential actions must not have more than one path to any specified table." This is for 2008, but the limitation persists.

https://learn.microsoft.com/en-us/previous-versions/sql/sql-server-2008-r2/ms186973(v=sql.105)

Upvotes: 0

Related Questions