Identifying vs Non-Identifying Relationships (Again!!!)

前端 未结 2 717
南旧
南旧 2021-01-14 05:36

So, I\'ve read a whole lot of answers here on stackoverflow, but I\'m still confused about the whole concept thereof. Specifically, I\'ve gone over this article (including a

2条回答
  •  长情又很酷
    2021-01-14 06:08

    Joel has provided a good answer (+1 to him), let me just offer a small mental shortcut that you can use when thinking about identifying relationships... just ask yourself:

    Can I achieve uniqueness only with the attributes of the child entity?

    If no, and you need to include the attributes migrated from the parent into the child key to make it unique, then you have an identifying relationship1. It's about identification-dependence, not existence-dependence2!

    You might be interested in this post for some more musings on the topic.


    1 And the child entity is "weak" or "dependent".

    2 Although identification-dependence usually implies existence-dependence.

提交回复
热议问题