title: Alternatives to the OPTIONAL fallback SPARQL pattern?
body: <p>I need to retrieve a single image for each resource in a target set, testing multiple non-exclusive predicates with a priority order.</p>
  
  <p>I'm <a href="http://yasgui.org/#query=prefix+dbo%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2F%3E%0A%0Aselect+%3Fr+%3Fi+where+%7B%0A%0A++++%3Fr+a+dbo%3AAutomobile+.%0A%0A++++optional+%7B+%3Fr+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2Fthumbnail%3E+%3Fi+%7D%0A++++optional+%7B+%3Fr+%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2Fdepiction%3E+%3Fi+%7D%0A++++optional+%7B+%3Fr+%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2Flogo%3E+%3Fi+%7D%0A++++optional+%7B+%3Fr+%3Chttp%3A%2F%2Fschema.org%2Fimage%3E+%3Fi+%7D%0A%0A%7D+limit+10&amp;contentTypeConstruct=text%2Fturtle&amp;contentTypeSelect=application%2Fsparql-results%2Bjson&amp;endpoint=http%3A%2F%2Fdbpedia.org%2Fsparql&amp;requestMethod=POST&amp;tabTitle=Query&amp;outputFormat=table" rel="nofollow">currently</a> using a standard OPTIONAL fallback pattern along the lines of</p>
  
  <pre><code>select ?r ?i where {
  
      ?r a dbo:Automobile .
  
      optional { ?r &lt;http://dbpedia.org/ontology/thumbnail&gt; ?i }
      optional { ?r &lt;http://xmlns.com/foaf/0.1/depiction&gt; ?i }
      optional { ?r &lt;http://xmlns.com/foaf/0.1/logo&gt; ?i }
      optional { ?r &lt;http://schema.org/image&gt; ?i }
  
  }
  </code></pre>
  
  <p>but this approach is turning out to be troublesome on some backends: is anyone aware of any simple/efficient alternative?</p>