What are the down sides of using a composite/compound primary key?

后端 未结 8 2264
说谎
说谎 2020-12-14 20:30

What are the down sides of using a composite/compound primary key?

8条回答
  •  误落风尘
    2020-12-14 21:09

    1. when you se it on a diagram are less readable
    2. when you use it on a query join are less readable
    3. when you use it on a foregein key you have to add a check constraint about all the attribute have to be null or not null (if only one is null the key is not checked)
    4. usualy need more storage when use it as foreign key
    5. some tool doesn't manage composite key

提交回复
热议问题