Link types(链接类型)¶
A link type is the schema definition of a relationship between two object types. A link refers to a single instance of that relationship between two objects in the same Ontology.
For example, in the Ontology Manager, you may create a link type between the Employee object type and the Company object type that defines the relationship between Employee and Employer. A link refers to a single instance of the Employee → Employer link type, like the relationship between the notional employee “Melissa Chang” and her employer, “Acme, Inc.”
Similarly, in the Ontology Manager, you may create a link type between the Flight object type and the Aircraft object type that defines the relationship between Scheduled Flight and Assigned Aircraft. A link refers to a single instance of the Scheduled Flight → Assigned Aircraft link type, like the relationship between “JFK → SFO 24-02-2021” and its assigned aircraft “Boeing 737-123”.
Links can also exist between two objects of the same type. A link type Direct Report ↔ Manager can be defined between the Employee object type and itself.
Note that links between object types across different Ontologies is not supported. In this case, you may prefer to leverage a shared Ontology.
The concepts underpinning the Ontology have analogous concepts in the structure of a dataset. The definition of a link type in the Ontology is analogous to that of a join between two datasets, while the definition of a link is analogous to that of a row joined with the fields of the same row in another dataset. For example, you can join the Employee dataset with the Company dataset to explore the relationship between Employees and their Employers. In the joined dataset, a single row that joins “Melissa Chang” with her employer “Acme, Inc.” represents a link.
Rather than being an abstract data model, the Foundry Ontology maps each ontological concept to an organization's actual data, enabling this data asset to power real-world applications. Links are created and displayed in user applications by adding backing datasources to the object types referred to in the link type in the Ontology Manager. In the case of link types where object types are related with a many-to-many cardinality, datasources back the link types themselves. To create links of type Employee → Employer, an organization will add backing datasources to the Employee and Company object types and connect their employee directory and other enterprise data into the Ontology.
Get started by learning how to create a new link type.
中文翻译¶
链接类型¶
链接类型(link type)是两个对象类型之间关系的模式定义。链接(link)则指同一本体(Ontology)中两个对象之间该关系的单个实例。
例如,在本体管理器中,您可以创建一个介于 Employee 对象类型和 Company 对象类型之间的链接类型,用于定义 Employee 与 Employer 之间的关系。而链接则指 Employee → Employer 链接类型的单个实例,比如虚拟员工"Melissa Chang"与其雇主"Acme, Inc."之间的关系。
同样地,在本体管理器中,您可以创建一个介于 Flight 对象类型和 Aircraft 对象类型之间的链接类型,用于定义 Scheduled Flight 与 Assigned Aircraft 之间的关系。链接则指 Scheduled Flight → Assigned Aircraft 链接类型的单个实例,比如"JFK → SFO 24-02-2021"与其指定飞机"Boeing 737-123"之间的关系。
链接也可以存在于同一类型的两个对象之间。例如,可以在 Employee 对象类型与其自身之间定义 Direct Report ↔ Manager 链接类型。
请注意,不支持跨不同本体的对象类型之间的链接。在这种情况下,建议使用共享本体(shared Ontology)。
本体所依托的概念在数据集结构中也有类似概念。本体中链接类型的定义类似于两个数据集之间的连接(join),而链接的定义则类似于某行与另一数据集中同一行字段连接后的结果。例如,您可以将 Employee 数据集与 Company 数据集进行连接,以探索 Employees 与其 Employers 之间的关系。在连接后的数据集中,将"Melissa Chang"与其雇主"Acme, Inc."连接起来的单行数据即代表一个链接。
Foundry 本体并非抽象数据模型,而是将每个本体概念映射到组织的实际数据,使这一数据资产能够驱动实际应用。通过在本体管理器中为链接类型所引用的对象类型添加支撑数据源(backing datasources),即可在用户应用中创建和显示链接。对于对象类型之间具有多对多基数关系的链接类型,链接类型本身需要由数据源支撑。要创建 Employee → Employer 类型的链接,组织需要为 Employee 和 Company 对象类型添加支撑数据源,并将其员工目录及其他企业数据接入本体。
开始使用前,请先了解如何创建新的链接类型。