- From: Mo Zhou <mozhou@umail.iu.edu>
- Date: Wed, 27 May 2009 13:57:45 -0400
- To: public-rdf-dawg-comments@w3.org
Hi, I recently read the specification. It is very helpful. However I got confused by the difference between OPTIONAL and UNION key words. In all queries using OPTIONAL, we can use UNION to write a query that generates the same results. and vice versa. for example: select ?x ?mbox where{ ?x foaf:name ?name . optional {?x foaf:mbox ?mbox} . optional {?x foaf:homepage ?hpage} } will generate the same result as select ?x ?mbox where{ {?x foaf:name ?name } . UNION {?x foaf:mbox ?mbox} . UNION {?x foaf:homepage ?hpage} } So why the specification includes both OPTIONAL and UNION? -- Thanks, Mo
Received on Thursday, 28 May 2009 06:44:10 UTC