Bidirectional foreign key constraint

前端 未结 6 1274
时光说笑
时光说笑 2020-12-19 07:33

I\'m thinking of designing a database schema similar to the following:

Person (
  PersonID int primary key,
  PrimaryAddressID int not null,
  ...
)

Address         


        
6条回答
  •  星月不相逢
    2020-12-19 08:23

    The second FK (PersonId from Address to Person) is too restrictive, IMHO. Are you suggesting that one address can only have a single person?

提交回复
热议问题