# Load data into relations between concepts

**URL:** <https://community.stardog.com/t/load-data-into-relations-between-concepts/3749>\
**Category:** Support\
**Created:** [May 18, 2022, 2:28pm UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749 "2022-05-18T14:28:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Romain\_DISSEGNA](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/romain_dissegna/32/1426_2.png) [@Romain\_DISSEGNA](https://community.stardog.com/u/Romain_DISSEGNA)\
**Post date:** [May 18, 2022, 2:28pm UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/1 "2022-05-18T14:28:27Z")

</div>

![community_stardog](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/f/ff4faa99bc5b1760a8ba5fbb07be593df3458c62.png)

Hello,  
we are working on a small ontology created on Protégé and uploaded to Stardog in .rdf format.

In this ontology, two concepts "Vulnerabilities" and "Weakness" each have sub-concepts "CVE" and "CWE". Conceptually, these "CVE" and "CWE" sub-concepts should be linked together with relations carried by the parent concepts represented by the red arrows on the screenshot. Unfortunately we were unable to load the data by doing this. To make it possible to link the "CVE" and "CWE" sub-concepts we had to directly create "Wields" and "isWieldBy" relations and load the data into them.

This mode of operation poses the following problem: if a parent concept "A" is attached to all the sub-concepts of another parent concept "B", this forces us to create as many relationships and to modify our entire ontology.

Conversely, when we enter the instances manually in Protégé and launch the reasoner, Protégé knows how to do the link inheritance perfectly and all our data is correctly attached between our parent and child concepts without it being necessary to create links with each child concept. We thought that the notion of relationship could be inherited from parents to children but we are unable to reproduce this behavior in Stardog. Is this a misunderstanding on our part? A design error? A feature that does not exist in Stardog? Misuse of the tool?

Thank you in advance for your help !

---

<div class="post-metadata">

**Author:** ![Laura\_Firey](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/laura_firey/32/635_2.png) [@Laura\_Firey](https://community.stardog.com/u/Laura_Firey)\
**Post date:** [May 18, 2022, 3:11pm UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/2 "2022-05-18T15:11:43Z")

</div>

Hi Romain,

If I am understanding correctly, you are accomplishing the same behavior in Designer. If you publish these mappings and query for triples consisting of `Vulnerabilities` `Wields` `Weakness` with reasoning on the relationship will be inherited as desired. It's inferred that all `Vulnerabilities` returned by the query will be of type `CVE`.

Designer only visualizations the explicit relationships and types. Stardog Explorer can be used to query and visualize data with reasoning on to also see inferred data. You will need to toggle reasoning on in [Explorer's settings](https://docs.stardog.com/stardog-applications/explorer/#settings). A feature to visualize inferred types when mapping and modeling in Designer is a great suggestion!

Hope this helps.

Laura

---

<div class="post-metadata">

**Author:** ![Romain\_DISSEGNA](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/romain_dissegna/32/1426_2.png) [@Romain\_DISSEGNA](https://community.stardog.com/u/Romain_DISSEGNA)\
**Post date:** [May 18, 2022, 3:50pm UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/3 "2022-05-18T15:50:50Z")

</div>

Hello Laura and thank you very much for your feedback.

I'm not sure I understood your answer, we're just trying to import a simple ontology with a relationship between two parent concepts. We then try in the Designer to correctly map the source files to feed the relations as well as the child concepts "CVE" and "CWE" but when we query in the Explorer it does not work. Instances of child concepts are unrelated. We are forced to create the relationship only and directly between the 2 child concepts for it to work. However, in Protégé only the relationship between the parent concepts is necessary and the relationship between the children is automatically inferred. Do you need more information on how we linked the concepts? The keys we used?...? Thanks in advance !

---

<div class="post-metadata">

**Author:** ![Laura\_Firey](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/laura_firey/32/635_2.png) [@Laura\_Firey](https://community.stardog.com/u/Laura_Firey)\
**Post date:** [May 18, 2022, 6:26pm UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/4 "2022-05-18T18:26:28Z")

</div>

Hi Romain,

The types are shown in Explorer but only in the details or inferred through filters. Details being the see details option when right clicking a node from the visualization canvas and inferred through filters implying if you set the class filter on the search to an inferred type, nodes inferred for that type will be included in the result set. Although, we only show leaf types in Explorer (given a tree or trees of related subclasses for an instance, we only show the ending types). We chose to do this as for deep ontologies showing all types can be inefficient and result a number of types that would be overwhelming in a visualization. In this case, I understand it is removing your ability to see that `Vulnerabilities` `Wields` `Weakness` in the visualization as Explorer will only present `Vulnerabilities` as `CVE` and `Weakness` as `CWE`.

Example for a similar dataset,  
For the following model and mapping in Designer  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/c/cd3fc086fc45445aa48b93da1004a6cbd4b8205d.png)

Lecturers data set:

| Person\_ID | Name | Class\_ID |
| --- | --- | --- |
| 1 | Joe | a |
| 2 | Jane | b |
| 3 | Fred | c |
| 4 | Samantha | d |

Courses dataset:

| Class\_ID | Name |
| --- | --- |
| a | Biology |
| b | Chemistry |
| c | Math |
| d | English |

In Explorer with reasoning on, you would be able to set the class selector to `Course` and search for `Math`. The node for `Math` will only be shown with the type of `Class` as we only show leaf nodes in Explorer. The `Math` node can be expanded by `teaches` to show the `Lecturer` (sorry in my example the `teaches`/`isTaughtBy` relationships are backwards). If you right click on the `Lecturer` node you can open the details for the node and see the type is both `Lecturer` and `Person`.

In Studio you can run SPARQL queries directly. So a query like

```auto
select ?s_label ?p_label ?o_label
where {
    ?s ?p ?o.
    ?s a <tag:stardog:project:220518160554:modelConceptClass:Course>.
    ?o a <tag:stardog:project:220518160554:modelConceptClass:Person>.
    ?s rdfs:label ?s_label.
    ?p rdfs:label ?p_label.
    ?o rdfs:label ?o_label.
    }

```

Would return the 4 `teaches` instances as expected with reasoning on. With reasoning off, no results would be returned as there is no explicit relationship between `Course` and `Person`.

On our side I'll add a feature request to be able to see all types of a node in Explorer and visualizing inferred types when mapping and modeling.

---

<div class="post-metadata">

**Author:** ![Romain\_DISSEGNA](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/romain_dissegna/32/1426_2.png) [@Romain\_DISSEGNA](https://community.stardog.com/u/Romain_DISSEGNA)\
**Post date:** [May 19, 2022, 3:54pm UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/5 "2022-05-19T15:54:55Z")

</div>

Hi Laura,

thanks for this detailed explanation.

My bad, the first one capture of our Designer is more like this :

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/b/bf554185c8782a91ba7aeefe4e8395d909eb322b.png)

As you can see, the link is between Vulnerabilities and Weaknessess. But we feed child classes "CWE" and "CVE".

Doing such mapping leads to no instance matching between data from "CVE" and data from "CWE" on the Explorer -\> Stardog show that a specific "CVE" instance is a subclass of vulnerabilities, the same for a specific "CWE" recognized as a subclass of Weakness.

To resume, in Explorer, this is what we expect :

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/d/d430b9c55a481f29afe6ae36f9312e4d2432c0a0.png)

And this is what we get :

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/5/54a6b92105bbe936b4d2e0d81b4ecffbc42e1025.png)

Hope my explanations are clear 🙂

Thanks !

---

<div class="post-metadata">

**Author:** ![Laura\_Firey](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/laura_firey/32/635_2.png) [@Laura\_Firey](https://community.stardog.com/u/Laura_Firey)\
**Post date:** [May 20, 2022, 5:26pm UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/6 "2022-05-20T17:26:18Z")

</div>

Thanks for the reply Romain. I see now what you were originally asking.

We don't currently offer an option in Designer to visualize the model how reasoning would include inheritance of properties. So though Designer you would not be able to map to properties such as wields/iswieldsby without explicitly defining them between cve/cwe, even though as you noted those properties could be inherited from their parent classes.

I have shared the feature request to be able to map to inherited properties in Designer.

Thanks,  
Laura

---

<div class="post-metadata">

**Author:** ![Romain\_DISSEGNA](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/romain_dissegna/32/1426_2.png) [@Romain\_DISSEGNA](https://community.stardog.com/u/Romain_DISSEGNA)\
**Post date:** [May 24, 2022, 7:42am UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/7 "2022-05-24T07:42:53Z")

</div>

Hi, Laura, thanks for you feedback 🙂 so we will modify our model to match Stardog capabilities.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [May 31, 2022, 6:55pm UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/8 "2022-05-31T18:55:19Z")

</div>

Automatically bumped on May 31, 2022, 6:55pm UTC



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [June 10, 2022, 2:41pm UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/9 "2022-06-10T14:41:37Z")

</div>

Automatically bumped on June 10, 2022, 2:41pm UTC



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [June 21, 2022, 2:09am UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/10 "2022-06-21T02:09:22Z")

</div>

Automatically bumped on June 21, 2022, 2:09am UTC



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [July 1, 2022, 9:54pm UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/11 "2022-07-01T21:54:08Z")

</div>

Automatically bumped on July 1, 2022, 9:54pm UTC



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [July 13, 2022, 10:17am UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/12 "2022-07-13T10:17:57Z")

</div>

Automatically bumped on July 13, 2022, 10:17am UTC



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [July 24, 2022, 2:05pm UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/13 "2022-07-24T14:05:14Z")

</div>

Automatically bumped on July 24, 2022, 2:05pm UTC



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [August 6, 2022, 7:31pm UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/14 "2022-08-06T19:31:20Z")

</div>

Automatically bumped on August 6, 2022, 7:31pm UTC



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [August 20, 2022, 3:38pm UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/15 "2022-08-20T15:38:01Z")

</div>

Automatically bumped on August 20, 2022, 3:38pm UTC



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [September 3, 2022, 1:45pm UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/16 "2022-09-03T13:45:58Z")

</div>

Automatically bumped on September 3, 2022, 1:45pm UTC



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [September 17, 2022, 5:10pm UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/17 "2022-09-17T17:10:12Z")

</div>

Automatically bumped on September 17, 2022, 5:10pm UTC



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [October 1, 2022, 10:06pm UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/18 "2022-10-01T22:06:50Z")

</div>

Automatically bumped on October 1, 2022, 10:06pm UTC



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [October 16, 2022, 2:42am UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/19 "2022-10-16T02:42:29Z")

</div>

Automatically bumped on October 16, 2022, 2:42am UTC



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [October 31, 2022, 5:53pm UTC](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749/20 "2022-10-31T17:53:49Z")

</div>

Automatically bumped on October 31, 2022, 5:53pm UTC



[Next page](https://community.stardog.com/t/load-data-into-relations-between-concepts/3749.md?page=2)
