How to source statments with neoj4 graph database?How do you change the size of figures drawn with matplotlib?How to Model Real-World Relationships in a Graph Database (like Neo4j)?Fast graph walking on RDF-like data: triple store or graph database?Graph DBs vs. Document DBs vs. TriplestoresDelete all nodes and relationships in neo4j 1.8Second Order Relationship in Graph DatabaseGraph Database, Modeling three node combination relationship efficientlytriplestores vs native graph dbs on fast queriesHow to model this graph correctly using Label Property Graph?Do any branches of graph theory consider abstraction?
Is "survival" paracord with fire starter strand dangerous
Why did Starhopper's exhaust plume become brighter just before landing?
How do I portray irrational anger in first person?
Moscow SVO airport, how to avoid scam taxis without pre-booking?
Why did the population of Bhutan drop by 70% between 2007 and 2008?
Did the Apollo Guidance Computer really use 60% of the world's ICs in 1963?
Journal published a paper, ignoring my objections as a referee
What is the sound/audio equivalent of "unsightly"?
Why do IR remotes influence AM radios?
How to determine the convexity of my problem and categorize it?
Answer with an image of my favorite musician
Fixing a blind bolt hole when the first 2-3 threads are ruined?
Is the Amazon rainforest the "world's lungs"?
Defending Castle from Zombies
Can a network vulnerability be exploited locally?
How can I observe Sgr A* with itelescope.net
Wrong Stamping of UK Visa
What caused the end of cybernetic implants?
Did ancient peoples ever hide their treasure behind puzzles?
Is it possible for a person to be tricked into becoming a lich?
What does "-1" represent in the value range for unsigned int and signed int?
Why does Sauron not permit his followers to use his name?
Unable to enroll in insurance now because of typo in email address
In Endgame, wouldn't Stark have remembered Hulk busting out of the stairwell?
How to source statments with neoj4 graph database?
How do you change the size of figures drawn with matplotlib?How to Model Real-World Relationships in a Graph Database (like Neo4j)?Fast graph walking on RDF-like data: triple store or graph database?Graph DBs vs. Document DBs vs. TriplestoresDelete all nodes and relationships in neo4j 1.8Second Order Relationship in Graph DatabaseGraph Database, Modeling three node combination relationship efficientlytriplestores vs native graph dbs on fast queriesHow to model this graph correctly using Label Property Graph?Do any branches of graph theory consider abstraction?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm looking forward to use NeoJ4 for some researchs. However I have to check if it can do what I want first.
I would like to build a graph that says :
StatementID1 = Cannabidiol hasPositiveEffectOn ChronicPain
StatementID1 isSupportedBy Study1
StatementID1 isSupportedBy Study2
StatementID1 isNotSupportedBy Study3
This is easy to add key:Value properties to a relationship in NeoJ4.
The difficulty is that I want Study1,2,3 to be nodes. So that these can have them own set of properties.
This can be done in a triplestore where each triple has an ID like "Statment1" here. This is a matter of adding triples where the object is another triple ID.
url:TripleID1 = url:Cannabidiol url:hasPositiveEffectOn url:ChronicPain
url:TripleID2 = url:TripleID1 url:isSupportedBy url:Study1
url:TripleID3 = url:TripleID1 url:isSupportedBy url:Study2
url:TripleID4 = url:TripleID1 url:isNotSupportedBy url:Study3
For the moment I can't find how to do it simplely in NeoJ4.
I could add the DOI of the study as a property :
Study 1 :
DOI:123/123
Then add the same DOI in the link :
isSupportedBy:
DOI:123/123
Since the DOI is unique it could be possible to make some searchs. However this will make things much more complex.
Is there a simpler method to achieve that?
graph neo4j rdf semantic-web n-quads
add a comment |
I'm looking forward to use NeoJ4 for some researchs. However I have to check if it can do what I want first.
I would like to build a graph that says :
StatementID1 = Cannabidiol hasPositiveEffectOn ChronicPain
StatementID1 isSupportedBy Study1
StatementID1 isSupportedBy Study2
StatementID1 isNotSupportedBy Study3
This is easy to add key:Value properties to a relationship in NeoJ4.
The difficulty is that I want Study1,2,3 to be nodes. So that these can have them own set of properties.
This can be done in a triplestore where each triple has an ID like "Statment1" here. This is a matter of adding triples where the object is another triple ID.
url:TripleID1 = url:Cannabidiol url:hasPositiveEffectOn url:ChronicPain
url:TripleID2 = url:TripleID1 url:isSupportedBy url:Study1
url:TripleID3 = url:TripleID1 url:isSupportedBy url:Study2
url:TripleID4 = url:TripleID1 url:isNotSupportedBy url:Study3
For the moment I can't find how to do it simplely in NeoJ4.
I could add the DOI of the study as a property :
Study 1 :
DOI:123/123
Then add the same DOI in the link :
isSupportedBy:
DOI:123/123
Since the DOI is unique it could be possible to make some searchs. However this will make things much more complex.
Is there a simpler method to achieve that?
graph neo4j rdf semantic-web n-quads
add a comment |
I'm looking forward to use NeoJ4 for some researchs. However I have to check if it can do what I want first.
I would like to build a graph that says :
StatementID1 = Cannabidiol hasPositiveEffectOn ChronicPain
StatementID1 isSupportedBy Study1
StatementID1 isSupportedBy Study2
StatementID1 isNotSupportedBy Study3
This is easy to add key:Value properties to a relationship in NeoJ4.
The difficulty is that I want Study1,2,3 to be nodes. So that these can have them own set of properties.
This can be done in a triplestore where each triple has an ID like "Statment1" here. This is a matter of adding triples where the object is another triple ID.
url:TripleID1 = url:Cannabidiol url:hasPositiveEffectOn url:ChronicPain
url:TripleID2 = url:TripleID1 url:isSupportedBy url:Study1
url:TripleID3 = url:TripleID1 url:isSupportedBy url:Study2
url:TripleID4 = url:TripleID1 url:isNotSupportedBy url:Study3
For the moment I can't find how to do it simplely in NeoJ4.
I could add the DOI of the study as a property :
Study 1 :
DOI:123/123
Then add the same DOI in the link :
isSupportedBy:
DOI:123/123
Since the DOI is unique it could be possible to make some searchs. However this will make things much more complex.
Is there a simpler method to achieve that?
graph neo4j rdf semantic-web n-quads
I'm looking forward to use NeoJ4 for some researchs. However I have to check if it can do what I want first.
I would like to build a graph that says :
StatementID1 = Cannabidiol hasPositiveEffectOn ChronicPain
StatementID1 isSupportedBy Study1
StatementID1 isSupportedBy Study2
StatementID1 isNotSupportedBy Study3
This is easy to add key:Value properties to a relationship in NeoJ4.
The difficulty is that I want Study1,2,3 to be nodes. So that these can have them own set of properties.
This can be done in a triplestore where each triple has an ID like "Statment1" here. This is a matter of adding triples where the object is another triple ID.
url:TripleID1 = url:Cannabidiol url:hasPositiveEffectOn url:ChronicPain
url:TripleID2 = url:TripleID1 url:isSupportedBy url:Study1
url:TripleID3 = url:TripleID1 url:isSupportedBy url:Study2
url:TripleID4 = url:TripleID1 url:isNotSupportedBy url:Study3
For the moment I can't find how to do it simplely in NeoJ4.
I could add the DOI of the study as a property :
Study 1 :
DOI:123/123
Then add the same DOI in the link :
isSupportedBy:
DOI:123/123
Since the DOI is unique it could be possible to make some searchs. However this will make things much more complex.
Is there a simpler method to achieve that?
graph neo4j rdf semantic-web n-quads
graph neo4j rdf semantic-web n-quads
edited Mar 27 at 22:18
Thib
asked Mar 27 at 21:57
ThibThib
547 bronze badges
547 bronze badges
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
I suppose this is a database design issue.
Would a node/relationship model something like the following fit your data and make your queries easy?
That's it but since the Cannaidiol can have positive effects on other medical conditions, we need 2 links : Statement -> Subjet and statement -> object. Yet another problem is that there could be studies that say that Cannabidiol has postive effect on chronic pain and studies that says it has no effect. So that we need to point also Statement -> HAS_POSITIVE_EFFECT, what is impossible, or double store the link name in the statment properties. Wich is complex...
– Thib
Mar 28 at 9:41
An option could be to do : Cannabidiol -> HAS -> Effect type:positive -> ON -> ChronicPain. Then we can add a Statement that has 3 links : SUBJECT -> Cannabidiol, EFFECT -> Effect, OBJECT -> ChronicPain, and is linked from studies...
– Thib
Mar 28 at 9:53
We could even delet the statement node if the Effect node is unique to this statement. Then all Studies nodes would point to the Effect node.
– Thib
Mar 28 at 12:10
1
@Thib Or even link the:Object
directly to the:Statement
. It really depends on the data you have (or plan to have) and the queries you expect to do. And, if after a while you have a better model, you can just change it (as long as there aren't lots of other things/people depending on the database not changing).
– rickhg12hs
Mar 29 at 9:08
add a comment |
Neo4j doesn’t support edges going from an edge to a node. Edges are always between nodes. So you’ll have to convert your positiveEffect edge to a node (as proposed in rickhg12hs’s answer) or model the positiveEffect as a non-edge (as you yourself proposed).
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55387102%2fhow-to-source-statments-with-neoj4-graph-database%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I suppose this is a database design issue.
Would a node/relationship model something like the following fit your data and make your queries easy?
That's it but since the Cannaidiol can have positive effects on other medical conditions, we need 2 links : Statement -> Subjet and statement -> object. Yet another problem is that there could be studies that say that Cannabidiol has postive effect on chronic pain and studies that says it has no effect. So that we need to point also Statement -> HAS_POSITIVE_EFFECT, what is impossible, or double store the link name in the statment properties. Wich is complex...
– Thib
Mar 28 at 9:41
An option could be to do : Cannabidiol -> HAS -> Effect type:positive -> ON -> ChronicPain. Then we can add a Statement that has 3 links : SUBJECT -> Cannabidiol, EFFECT -> Effect, OBJECT -> ChronicPain, and is linked from studies...
– Thib
Mar 28 at 9:53
We could even delet the statement node if the Effect node is unique to this statement. Then all Studies nodes would point to the Effect node.
– Thib
Mar 28 at 12:10
1
@Thib Or even link the:Object
directly to the:Statement
. It really depends on the data you have (or plan to have) and the queries you expect to do. And, if after a while you have a better model, you can just change it (as long as there aren't lots of other things/people depending on the database not changing).
– rickhg12hs
Mar 29 at 9:08
add a comment |
I suppose this is a database design issue.
Would a node/relationship model something like the following fit your data and make your queries easy?
That's it but since the Cannaidiol can have positive effects on other medical conditions, we need 2 links : Statement -> Subjet and statement -> object. Yet another problem is that there could be studies that say that Cannabidiol has postive effect on chronic pain and studies that says it has no effect. So that we need to point also Statement -> HAS_POSITIVE_EFFECT, what is impossible, or double store the link name in the statment properties. Wich is complex...
– Thib
Mar 28 at 9:41
An option could be to do : Cannabidiol -> HAS -> Effect type:positive -> ON -> ChronicPain. Then we can add a Statement that has 3 links : SUBJECT -> Cannabidiol, EFFECT -> Effect, OBJECT -> ChronicPain, and is linked from studies...
– Thib
Mar 28 at 9:53
We could even delet the statement node if the Effect node is unique to this statement. Then all Studies nodes would point to the Effect node.
– Thib
Mar 28 at 12:10
1
@Thib Or even link the:Object
directly to the:Statement
. It really depends on the data you have (or plan to have) and the queries you expect to do. And, if after a while you have a better model, you can just change it (as long as there aren't lots of other things/people depending on the database not changing).
– rickhg12hs
Mar 29 at 9:08
add a comment |
I suppose this is a database design issue.
Would a node/relationship model something like the following fit your data and make your queries easy?
I suppose this is a database design issue.
Would a node/relationship model something like the following fit your data and make your queries easy?
answered Mar 28 at 3:30
rickhg12hsrickhg12hs
3,06212 silver badges32 bronze badges
3,06212 silver badges32 bronze badges
That's it but since the Cannaidiol can have positive effects on other medical conditions, we need 2 links : Statement -> Subjet and statement -> object. Yet another problem is that there could be studies that say that Cannabidiol has postive effect on chronic pain and studies that says it has no effect. So that we need to point also Statement -> HAS_POSITIVE_EFFECT, what is impossible, or double store the link name in the statment properties. Wich is complex...
– Thib
Mar 28 at 9:41
An option could be to do : Cannabidiol -> HAS -> Effect type:positive -> ON -> ChronicPain. Then we can add a Statement that has 3 links : SUBJECT -> Cannabidiol, EFFECT -> Effect, OBJECT -> ChronicPain, and is linked from studies...
– Thib
Mar 28 at 9:53
We could even delet the statement node if the Effect node is unique to this statement. Then all Studies nodes would point to the Effect node.
– Thib
Mar 28 at 12:10
1
@Thib Or even link the:Object
directly to the:Statement
. It really depends on the data you have (or plan to have) and the queries you expect to do. And, if after a while you have a better model, you can just change it (as long as there aren't lots of other things/people depending on the database not changing).
– rickhg12hs
Mar 29 at 9:08
add a comment |
That's it but since the Cannaidiol can have positive effects on other medical conditions, we need 2 links : Statement -> Subjet and statement -> object. Yet another problem is that there could be studies that say that Cannabidiol has postive effect on chronic pain and studies that says it has no effect. So that we need to point also Statement -> HAS_POSITIVE_EFFECT, what is impossible, or double store the link name in the statment properties. Wich is complex...
– Thib
Mar 28 at 9:41
An option could be to do : Cannabidiol -> HAS -> Effect type:positive -> ON -> ChronicPain. Then we can add a Statement that has 3 links : SUBJECT -> Cannabidiol, EFFECT -> Effect, OBJECT -> ChronicPain, and is linked from studies...
– Thib
Mar 28 at 9:53
We could even delet the statement node if the Effect node is unique to this statement. Then all Studies nodes would point to the Effect node.
– Thib
Mar 28 at 12:10
1
@Thib Or even link the:Object
directly to the:Statement
. It really depends on the data you have (or plan to have) and the queries you expect to do. And, if after a while you have a better model, you can just change it (as long as there aren't lots of other things/people depending on the database not changing).
– rickhg12hs
Mar 29 at 9:08
That's it but since the Cannaidiol can have positive effects on other medical conditions, we need 2 links : Statement -> Subjet and statement -> object. Yet another problem is that there could be studies that say that Cannabidiol has postive effect on chronic pain and studies that says it has no effect. So that we need to point also Statement -> HAS_POSITIVE_EFFECT, what is impossible, or double store the link name in the statment properties. Wich is complex...
– Thib
Mar 28 at 9:41
That's it but since the Cannaidiol can have positive effects on other medical conditions, we need 2 links : Statement -> Subjet and statement -> object. Yet another problem is that there could be studies that say that Cannabidiol has postive effect on chronic pain and studies that says it has no effect. So that we need to point also Statement -> HAS_POSITIVE_EFFECT, what is impossible, or double store the link name in the statment properties. Wich is complex...
– Thib
Mar 28 at 9:41
An option could be to do : Cannabidiol -> HAS -> Effect type:positive -> ON -> ChronicPain. Then we can add a Statement that has 3 links : SUBJECT -> Cannabidiol, EFFECT -> Effect, OBJECT -> ChronicPain, and is linked from studies...
– Thib
Mar 28 at 9:53
An option could be to do : Cannabidiol -> HAS -> Effect type:positive -> ON -> ChronicPain. Then we can add a Statement that has 3 links : SUBJECT -> Cannabidiol, EFFECT -> Effect, OBJECT -> ChronicPain, and is linked from studies...
– Thib
Mar 28 at 9:53
We could even delet the statement node if the Effect node is unique to this statement. Then all Studies nodes would point to the Effect node.
– Thib
Mar 28 at 12:10
We could even delet the statement node if the Effect node is unique to this statement. Then all Studies nodes would point to the Effect node.
– Thib
Mar 28 at 12:10
1
1
@Thib Or even link the
:Object
directly to the :Statement
. It really depends on the data you have (or plan to have) and the queries you expect to do. And, if after a while you have a better model, you can just change it (as long as there aren't lots of other things/people depending on the database not changing).– rickhg12hs
Mar 29 at 9:08
@Thib Or even link the
:Object
directly to the :Statement
. It really depends on the data you have (or plan to have) and the queries you expect to do. And, if after a while you have a better model, you can just change it (as long as there aren't lots of other things/people depending on the database not changing).– rickhg12hs
Mar 29 at 9:08
add a comment |
Neo4j doesn’t support edges going from an edge to a node. Edges are always between nodes. So you’ll have to convert your positiveEffect edge to a node (as proposed in rickhg12hs’s answer) or model the positiveEffect as a non-edge (as you yourself proposed).
add a comment |
Neo4j doesn’t support edges going from an edge to a node. Edges are always between nodes. So you’ll have to convert your positiveEffect edge to a node (as proposed in rickhg12hs’s answer) or model the positiveEffect as a non-edge (as you yourself proposed).
add a comment |
Neo4j doesn’t support edges going from an edge to a node. Edges are always between nodes. So you’ll have to convert your positiveEffect edge to a node (as proposed in rickhg12hs’s answer) or model the positiveEffect as a non-edge (as you yourself proposed).
Neo4j doesn’t support edges going from an edge to a node. Edges are always between nodes. So you’ll have to convert your positiveEffect edge to a node (as proposed in rickhg12hs’s answer) or model the positiveEffect as a non-edge (as you yourself proposed).
answered Mar 28 at 6:34
cygricygri
8,6561 gold badge20 silver badges46 bronze badges
8,6561 gold badge20 silver badges46 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55387102%2fhow-to-source-statments-with-neoj4-graph-database%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown