EER - 示例中的识别和非识别关系
如果我有三张表,一张用于用户
,一张用于activationLink
,一张用于位置
。
-users
和activationLink
之间的关系是一种识别关系,因为特定的activationLink
仅当用户在系统中注册时才存在。
-但是用户
和位置
之间的关系是非标识性的,因为位置
在没有用户
的情况下也存在。
-如果存在一个名为users
的表和另一个名为worker
和student
的表,则worker
和student
可以在没有用户
的情况下存在吗?是非识别关系吗?
我的三点逻辑是否正确?
谢谢。
If i have three tables, One for users
, one for activationLink
and one for location
.
-The relation between the users
and activationLink
is an identifying relationship because the specific activationLink
only exists if the user is registered in the system.
-But the relation between users
and location
is non identifying, because the location
exists without the users
.
-And if exists a table called users
and other called worker
and student
, the worker
and student
can exist without the users
? is a non identifying relationship?
my logic is correct in the three points?
thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
(1) User 和 ActivationLink 之间的关系并不完全清晰。
这可能是一种识别关系,但在做出决定之前我想了解更多。
(2)正确。用户和位置是(正如您在此处所描述的)独立的实体。
(3) 仅根据所用词语的典型含义,人们会假设“用户可以是学生或工人”,因此它们听起来像子类型......但这不可能是由现有信息证明或反驳。后续问题是:
(1) The relation between User and ActivationLink is not entirely clear as presented.
It is probably an identifying relationship, but I'd like to know a bit more before comitting to it.
(2) Correct. Users and Locations are (as you have described here) separate entities.
(3) Based solely on the typical meanings derived from the words used, one would assume that "A User can be a Student or a Workder", so they sound like subtypes... but this cannot be proved or disproved by the information at hand. Followup questions are:
“-用户和activationLink之间的关系是一种识别关系,因为特定的activationLink仅当用户在系统中注册时才存在。”
嗯嗯嗯嗯嗯。那么定义是,如果“没有 X”Y 不能存在,那么 x 和 Y 之间的关系就是“识别”的?
这与我受教时的记忆不完全一样。我想我已经被告知,如果关系本身(必然?)是(“子”实体的)键/标识符的一部分,那么该关系就是“标识”的。也就是说,父实体的逻辑键/标识符的属性也是子实体的逻辑键/标识符的一部分。您的示例中是这种情况吗?激活链接本身不是唯一的吗?多个不同的用户可以“共享”相同的激活链接吗?听起来很奇怪。
请注意,这个定义使这个概念变得肤浅,如果不是完全不适用的话,对于至少一侧没有“多”的关系(例如您的用户-工作人员关系)。
"-The relation between the users and activationLink is an identifying relationship because the specific activationLink only exists if the user is registered in the system."
Hmmmmmmmmmmmm. So the definition is then that a relationship between x and Y is "identifying" if the Y cannot exist "without the X" ?
That's not exactly what I remember from when I was taught. I think I've been told that a relationship is "identifying" if the relationship itself is (necessarily ?) part of the key/identifier (of the "child" entity). That is, that the attributes of the logical key/identifier of the parent entity are also part of the logical key/identifier of the child entity. Is this the case in your example ? Are activationlinks not unique by and of themselves ? Can several distinct users "share" the same activationlink ? Sounds odd.
Note that this definition makes the concept superficial, if not completely inapplicable, to relationships that do not have a "many" on at least one of its sides (such as your user-worker relationship, e.g.).