先决条件 – ER 模型
强实体:
强实体不依赖于模式中的任何其他实体。一个强大的实体总是有一个主键。强实体由单个矩形表示。两个强实体的关系由单个菱形表示。
各种强大的实体组合在一起时,会创建一个强大的实体集。
弱实体:
弱实体依赖于强实体来确保其存在。与强实体不同,弱实体没有任何主键。相反,它有一个部分鉴别器键。弱实体由双矩形表示。
一个强实体和一个弱实体之间的关系由双菱形表示。
强实体和弱实体的区别:
S.NO | Strong Entity | Weak Entity |
---|---|---|
1. | Strong entity always has primary key. | While weak entity has partial discriminator key. |
2. | Strong entity is not dependent of any other entity. | Weak entity is depend on strong entity. |
3. | Strong entity is represented by single rectangle. | Weak entity is represented by double rectangle. |
4. | Two strong entity’s relationship is represented by single diamond. | While the relation between one strong and one weak entity is represented by double diamond. |
5. | Strong entity have either total participation or not. | While weak entity always has total participation. |