query-a9431414eb7f655fb2ade2dbdad1c087

rq turtle/ttl

قم بتشغيل هذا الاستعلام، كما أكتب هذا، فإنه لا يؤدي إلا إلى نتيجتين اثنين - هزيلة قليلا! لماذا هذا؟ وجدنا أكثر من مائة كتاب في وقت سابق! السبب هو أنه لمطابقة هذا الاستعلام; يجب أن تتطابق نتيجة محتملة (كتاب) مع جميع الثلاثيات المدرجة في القائمة: يجب أن يكون لها عنوان، ورسام، وناشر، وتاريخ نشر، إذا كان يحتوي على بعض هذه الخصائص، وليس كلها، فلن يتطابق، وهذا ليس ما نريده في هذه الحالة: نريد في المقام الأول قائمة بجميع الكتب، إذا توفرت بيانات إضافية، فنحن نرغب في تضمينها، لكننا لا نريد أن يحد ذلك من قائمة النتائج. : اختياريةالحل هو أن تخبر خدمة استعلام ويكي بيانات أن هذه الثلاثيات Run that query. As I’m writing this, it only returns two results – a bit meager! Why is that? We found over a hundred books earlier! The reason is that to match this query, a potential result (a book) must match all the triples we listed: it must have a title, and an illustrator, and a publisher, and a publication date. If it has some of those properties, but not all of them, it won’t match. And that’s not what we want in this case: we primarily want a list of all the books – if additional data is available, we’d like to include it, but we don’t want that to limit our list of results. : optionalThe solution is to tell WDQS that those triples are Run that query. As I’m writing this, it only returns two results – a bit meagre! Why is that? We found over a hundred books earlier! The reason is that to match this query, a potential result (a book) must match all the triples we listed: it must have a title, and an illustrator, and a publisher, and a publication date. If it has some of those properties, but not all of them, it won’t match. And that’s not what we want in this case: we primarily want a list of all the books – if additional data is available, we’d like to include it, but we don’t want that to limit our list of results. : optionalThe solution is to tell WDQS that those triples are クエリーを実行してみます。私がこれを書いた時点では、返ってきた結果は2つだけでした。少々残念な結果ですね。なぜこうなったのでしょうか。前は100冊以上の本が見つかったのに。 その理由は、このクエリに一致するためには、結果(本)がここで列挙したすべてのトリプルに一致する必要があるためです。結果にはタイトル、イラストレーター、出版社、および出版日のすべてが含まれていなければなりません。これらのプロパティの一部が含まれていても、すべてが含まれていなければ、一致しません。しかしそれでは本来ここで欲しかったものにはなりません。まず欲しいのはすべての本のリストなのですから。追加のデータが利用可能であればそれも含めたいのですが、そのことで結果のリストを制限したくはないのです。 解決策は、これらのトリプルが「オプション」であることをWDQSに伝えることです。 Voer de query uit. Terwijl ik dit schrijf, geeft het slechts twee resultaten! Waarom is dat zo? We vonden eerder meer dan honderd boeken! De reden is dat een potentieel resultaat (een boek) om deze vraag te beantwoorden, alle drie de tripels moeten overeenkomen die we hebben vermeld: het moet een titel hebben, een illustrator, een uitgever en een publicatiedatum. Als het een aantal van die eigenschappen heeft, maar niet alle, zal het niet overeenkomen. En dat is niet wat we willen in dit geval: we willen in de eerste plaats een lijst van alle boeken. Als er extra gegevens beschikbaar zijn, willen we die weten, maar we willen niet dat dat onze lijst van resultaten beperkt. zijn: optioneelDe oplossing is om WDQS te vertellen dat die tripels

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?book ?title ?illustratorLabel ?publisherLabel ?published
WHERE
{
  ?book wdt:P50 wd:Q35610.
  OPTIONAL { ?book wdt:P1476 ?title. }
  OPTIONAL { ?book wdt:P110  ?illustrator. }
  OPTIONAL { ?book wdt:P123  ?publisher. }
  OPTIONAL { ?book wdt:P577  ?published. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?book"):::projected v3("?illustrator") v5("?published"):::projected v4("?publisher") v2("?title"):::projected c8(["bd:serviceParam"]):::iri c10(["#91;AUTO_LANGUAGE#93;"]):::literal c2(["wd:Q35610"]):::iri v1 --"wdt:P50"--> c2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P1476".-> v2 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P110".-> v3 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P123".-> v4 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P577".-> v5 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end