角色模型_角色模型中的链接事实类型

角色模型

To understand Link Fact Types, let us look at an example of where and how they are used.

要了解链接事实类型,让我们看一个在何处以及如何使用它们的示例。

Imagine the Property Graph Schema below, and where you are creating a conceptual model for a graph database that stores information about parts stored in warehouses for an inventory software solution:

想象一下下面的“属性图模式”,您将在其中为图数据库创建概念模型,该模型数据库存储有关库存软件解决方案的仓库中存储的零件的信息:

Each StockedItem represents a part is stored in a bin in a warehouse. Notice the named edges, is for, is in and is in. A distinguishing feature of property graph schemas is the named edge. So we can speak of the ‘is for’ edge, and the relationship between a StockedItem and the Part it represents as StockedItem is for Part.

每个StockedItem代表一个零件,该零件存储在仓库的垃圾箱中。 请注意,命名的边为for位于 。 属性图模式的一个显着特征是命名边。 因此,我们可以说“是”边缘,并且StockedItem和它表示为StockedItem的零件之间的关系就是Part

We understand what we are talking about if we picture a real world scenario, where a storeman is reaching for a part in a bin in a warehouse.

如果我们了解一个现实世界的场景,即当一名仓库保管员正在伸手去拿仓库中的仓库中的零件时,我们就会明白我们在说什么。

Image for post
Image via 图片由 Dreamstime.comDreamstime.com under license to Victor Morgante. ID 102810076 © Seventyfourimages | Dreamstime.com 授权给Victor Morgante使用 。 ID 102810076©Seventyfourimages | Dreamstime.com

Now examine the Object-Role Model below, also representing the conceptual model of parts in bins in warehouses:

现在检查下面的对象角色模型,该对象角色模型还表示仓库中垃圾箱中零件的概念模型:

Image for post
An Object-Role Model
对象角色模型

Note that, on the face of it, each StockedItem does not have relationships with Fact Type Readings that read, StockedItem is for Part, StockedItem is in Bin and Stocked Item is in Warehouse. We say, “on the face of it”, because in this view of the ORM model we are not showing the Link Fact Types that are implied for each Objectified Fact Type, and where StockedItem is an Objectified Fact Type.

请注意,从表面上看,每个StockedItem与读取的事实类型读数都没有关系, StockedItem用于部件StockedItem在Bin中Stocked Item在Warehouse中 。 我们说“表面上” ,因为在ORM模型的此视图中,我们没有显示每个对象化事实类型隐含的链接事实类型,而StockedItem是对象化事实类型。

Part is in Bin in Warehouse is a Fact Type in ORM, and when objectified, we can think of the fact type/relationship as if it were an ostensible node in our Property Graph Schema.

Part in Warehouse中的Bin是ORM中的事实类型,当被客观化时,我们可以认为事实类型/关系就像它是我们的“属性图模式”中的表面节点。

Let us now look at the implied Link Fact Types for StockedItem in our Object-Role Model. The Link Fact Types are the fact types with a dashed outline:

现在,让我们看看对象角色模型中StockedItem的隐式链接事实类型。 链接事实类型是带有虚线轮廓的事实类型:

Image for post
Object-Role Model with Link Fact Types
具有链接事实类型的对象角色模型

Now we do have Fact Type Readings that read, StockedItem is for Part, StockedItem is in Bin and Stocked Item is in Warehouse.

现在,我们的事实类型读数为: StockedItem用于零件StockedItem位于Bin中Stocked 项目位于Warehouse中

Link Fact Types are as simple as that. For each Objectified-Fact Type there is a set of implied fact types joining to the respective model elements that play roles in the Objectified-Fact Type.

链接事实类型就这么简单。 对于每个“物化事实类型”,都有一组隐含的事实类型,它们连接到在“物化事实类型”中起作用的各个模型元素。

The beauty of Object-Role Modeling, of course, is that once you have created the ORM diagram, you can convert it to a Property Graph Schema or an Entity Relationship Diagram, as below:

当然,对象角色建模的魅力在于,一旦创建了ORM图,就可以将其转换为属性图模式 实体关系图 ,如下所示:

Image for post
An Entity Relationship Diagram
实体关系图

Note how the predicate parts ‘is for’, ‘is in’ and ‘is in’, for their respective relationships carry over to our Entity Relationship Diagram as well.

请注意谓词部分“是为”,“在”和“在”的方式,因为它们各自的关系也会延续到我们的实体关系图中。

As a bonus to Object-Role Modeling, you get to capture the predicated reading ‘Part is in Bin in Warehouse’ also, further adding to the semantics of the conceptual model you are creating.

作为对象角色建模的一项奖励,您还可以捕获谓词“零件在仓库中的仓库中”,这进一步增加了所创建概念模型的语义。

Thank you for reading. I hope this has been helpful in understanding Link Fact Types and the role they play in Object-Role Modeling.

感谢您的阅读。 我希望这有助于理解链接事实类型及其在对象角色建模中的作用。

Picture Credit: ID 102810076 © Seventyfourimages | Dreamstime.com

图片来源:ID 102810076©Seventyfourimages | Dreamstime.com

=======================================

======================================

翻译自: https://towardsdatascience.com/link-fact-types-in-object-role-modeling-3c68c15eec92

角色模型

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值