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;








2















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?










share|improve this question
































    2















    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?










    share|improve this question




























      2












      2








      2


      1






      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?










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 27 at 22:18







      Thib

















      asked Mar 27 at 21:57









      ThibThib

      547 bronze badges




      547 bronze badges

























          2 Answers
          2






          active

          oldest

          votes


















          2















          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?



          Graph Database Model






          share|improve this answer

























          • 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



















          2















          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).






          share|improve this answer



























            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
            );



            );













            draft saved

            draft discarded


















            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









            2















            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?



            Graph Database Model






            share|improve this answer

























            • 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
















            2















            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?



            Graph Database Model






            share|improve this answer

























            • 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














            2














            2










            2









            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?



            Graph Database Model






            share|improve this answer













            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?



            Graph Database Model







            share|improve this answer












            share|improve this answer



            share|improve this answer










            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


















            • 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














            2















            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).






            share|improve this answer





























              2















              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).






              share|improve this answer



























                2














                2










                2









                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).






                share|improve this answer













                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).







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 28 at 6:34









                cygricygri

                8,6561 gold badge20 silver badges46 bronze badges




                8,6561 gold badge20 silver badges46 bronze badges






























                    draft saved

                    draft discarded
















































                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                    은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현