zoukankan      html  css  js  c++  java
  • The relationship's type

    Understanding Relationship Types


    DEF1X supports three relationship types:

    • Identifying
    • Non-Identifying
    • Non-Specific

    The selection of relationship types is fundamental to the referential integrity built into your data models. To help you select the relationship type appropriate to your environment, each of the supported relationship types is described below.

    Identifying Relationships

    Identifying relationships propagate the parent entity's primary key to the child's primary key. In the IDEF1X notation, identifying relationships are drawn as solid lines with a solid circle terminating the child entity.

    Non-Identifying Relationships

    Non-identifying relationships propagate the parent entity's primary key to the non-key attributes of the child. In the IDEF1X notation, non-identifying relationships are drawn as dashed lines with a solid circle terminating the child entity. If the non-identifying relationship is optional, then a hollow diamond terminates the parent entity.

    Non-Specific Relationships

    Non-specific relationships denote many-to-many relationships. Because many-to-many relationships cannot be resolved, non-specific relationships do not propagate any foreign keys. Many-to-many relationships are undesirable and should be removed as you normalize your data model. In the IDEF1X notation, non-specific relationships are drawn as solid lines with solid circles terminating both entities.

    Relationship Types and Compound Keys

    Think carefully about the use of different relationship types and its implications concerning identification. Identifying relationships propagate primary keys as primary keys to child entities, resulting in compound keys. The use of compound keys is often valid and appropriate. However, you should use them only when needed since they limit the flexibility of your data model. Whenever you use a compound key, this means that the data contained in the child entity can only be identified in the context of its parent. If you ever need to use the data independently, then you will have a problem.

  • 相关阅读:
    【BZOJ】4671: 异或图
    【LOJ】#2035. 「SDOI2016」征途
    【UOJ】#37. 【清华集训2014】主旋律
    【LOJ】#2320. 「清华集训 2017」生成树计数
    【LOJ】#2290. 「THUWC 2017」随机二分图
    【LOJ】#2291. 「THUSC 2016」补退选
    【LOJ】 #2545. 「JXOI2018」守卫
    【LOJ】#2292. 「THUSC 2016」成绩单
    【LOJ】#2562. 「SDOI2018」战略游戏
    《linux 内核全然剖析》sched.c sched.h 代码分析笔记
  • 原文地址:https://www.cnblogs.com/enli/p/41341.html
Copyright © 2011-2022 走看看