The Knowledge Graph Conference Icon
The Knowledge Graph Conference
  • 🏠Home
  • 📅Events
  • 👤Members
  • 🔵Announcements
  • 🔵Ask
  • 🔵Ask The Ontologists
  • 🔵Events
  • 🔵Jobs
  • 🔵Promotions
  • 🔵Share
Powered by Tightknit
Ask
Ask

Question on SPARQL Abbreviated Blank Node Syntax Explained

Avatar of Jeffrey T.Jeffrey T.
·Dec 04, 2020 09:02 PM

Hi, Group. I have a (SPARQL [Turtle?]) question re: abbreviated blank node syntax. Consider this trivial model: a --relates--> b b --relates--> c b <--relatedBy-- c Note that the b to c relationship is reciprocal. I’d like to represent b and c as blank nodes. Using the label form, it’s seemingly straightforward (I’ve added a couple of additional rdfs:type triples to fill-out a bit what I show next): a ex:relates _:b _: b rdfs:type ex:foo _:b ex:relates _:c _:c rdfs:type ex:bar _:c ex:relatedBy _:b Using the abbreviated form, though, doesn’t seem possible : a ex:relates [ rdfs:type ex:foo ; ex: relates [ rdfs:type ex:bar ; ex:relatedBy <what would go here to refer to the first (outer) blank node?> ] ]. I suppose I’m asking if something can simultaneously be both the container and contained, but perhaps there’s some syntactic sugar/legerdemain I’m not aware of that makes this possible. Thanks! (NB: Also posted this to the users@jena.apache.org listserv; will report back with findings/replies.)

👍1

24 comments

· Sorted by Oldest
    • Avatar of Ellie Y.
      Ellie Y.
      ·

      hey jeffrey! there's a SPARQL discussion going on over at the answers.knowledgegraph.tech board, which is a better place for these questions too so that the answers don't vanish over time

    • Avatar of Ellie Y.
      Ellie Y.
      ·

      Michael G. I see you typing...maybe he can answer over there?

    • Avatar of Michael G.
      Michael G.
      ·

      fwiw, i avoid bnodes at all costs. there's rarely a good reason for them

      ☝️1
    • Avatar of Michael G.
      Michael G.
      ·

      someone has to invite me to the site 😃

    • Avatar of Ellie Y.
      Ellie Y.
      ·

      oh yes! daria

    • Avatar of Jeffrey T.
      Jeffrey T.
      ·

      Thanks, Ellie Y.--I'll wait to be added. Michael G.: Thanks for your $0.02. Re: using blank nodes, there's an aversion on the team to minting URIs for pass-through relationships (akin to intersection entities in the relational world). I'm not necessarily arguing for or against, just reflecting the motivation behind my question.

      👍1
    • Avatar of Michael G.
      Michael G.
      ·

      i think skolemization is perfectly reasonable approach. in practice, if something is worth asserting data about, it's probably worth querying for, which means it needs an id. in practice many systems provide stability of bnode identifiers even tho that is not prescribed by the spec, so you could rely on that, but it does lock you into a particular set of backends and a specific grey area

      ☝️1
    • Avatar of Jeffrey T.
      Jeffrey T.
      ·

      Michael G. Re: "skolemization," I've only been doing semantic web work in earnest since April, and don't have formal training in symbolic logic. I came across this definition, which I'm afraid doesn't help me much: "Skolemization is the replacement of strong quantifiers in a sequent by fresh function symbols, where a strong quantifier is a positive occurrence of a universal quantifier or a negative occurrence of an existential quantifier" (so something to do with removing the upside-down A's and negated backwards E's from a formulation :-) Can you perhaps offer a less formal definition, one that's within the context of blank nodes/URI creation? Thank you.

    • Avatar of Jeffrey T.
      Jeffrey T.
      ·

      (Love your product by the way--the visualization capabilities within Studio are incredibly helpful and useful.)

    • Avatar of Ellie Y.
      Ellie Y.
      ·

      did both of you get the invite to the answers board alright?

    • Avatar of Michael G.
      Michael G.
      ·

      thx for the complement, i recall your name from our community forums

    • Avatar of Michael G.
      Michael G.
      ·

      i did not

    • Avatar of Michael G.
      Michael G.
      ·

      and Jeffrey T. re: skolemization, i really just mean, give your bnodes ids so they're not bnodes. i cant recall many occasions where bnodes were a good design choice for what i was doing

      👍1
    • Avatar of Ellie Y.
      Ellie Y.
      ·

      here's an invite link: https://answers.knowledgegraph.tech/invites/d396250c6d3a6040c50af2ca90b6f9c6

      👍1
    • Avatar of Michael G.
      Michael G.
      ·

      i have an existing account, Daria was going to hook me up with that

      👍1