1 Reply Latest reply: Aug 11, 2011 11:57 AM by alwu-Oracle RSS

    Do we have Joins  , Intersection in SPARQL

    880207
      Hi,

      In our SQL we have OUTER / INNER JOINS, is there anything similar in SPARQL?
      Also i found UNION in SPARQL, Do we have INTERSECTION in SPARQL?

      Thanks and Regards,
      Manish H
        • 1. Re: Do we have Joins  , Intersection in SPARQL
          alwu-Oracle
          Hi,

          In a BGP, patterns are joined together. SPARQL OPTIONAL is similar to outer join.

          Say you have a query pattern ?x :friendOf :John, and you want to do an intersection
          with query pattern ?x :friendOf :Mary, an easy way is to put these two patterns together.

          { ?x  :friendOf   :John .  ?x  :friendOf   :Mary .}

          The following SPEC has all the information you need for SPARQL 1.0.
          http://www.w3.org/TR/rdf-sparql-query/

          Thanks,

          Zhe Wu