在 ERD 中,是什么使得实体“可选”? 与“必需”?
As I understand it, the white dot indicates "optional" while the black dot means "required".
If so, a Category is required while a Classified is optional.
But what does that actually mean in the database - to say that a Category is required and a Classified is optional?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果关系的子项(在上面的示例中设置为“已分类”)是可选的,则该列在数据库中定义为允许空记录。 即设置为NULL。 这意味着您可以指定没有记录从分类链接到类别,也可以指定许多记录。
If the child of the relationship (in the example above set as "classified"), is optional then the column is defined with the database as allowing null records. i.e set to NULL. This means that you can either specify no records as being linked from classified to category, or many records.
在某些情况下,这可能意味着外键是否允许为 NULL 之间的差异。
在其他情况下,您可能需要通过约束或应用程序代码进行检查。
不幸的是,我不熟悉您发布的图表中使用的符号,所以我无法告诉您它的含义。
In some cases, it could mean the difference between a foreign key being allowed to be
NULL
or not.In other cases it might be something you need to check via constraints or application code.
Unfortunately I'm unfamiliar with the notation used in the diagram you post so I can't tell you what it means there.