query-e5eb2abaf98d45d59a516c2cc1b783bf

rq turtle/ttl

أساسيات سباركليبدو استعلام سباركل بسيط مثل هذا: } .?c f ?b .?b n m .?a y x { WHERE ?c ?b ?a SELECT على قيود عليها، معظمها في صورة ثلاثيات، يتم تخزين جميع المعلومات في ويكي بيانات (وقواعد بيانات المعرفة المماثلة) في شكل ثلاثيات، عندما تقوم بتشغيل الاستعلام، تحاول خدمة الاستعلام ملء المتغيرات بالقيم الفعلية بحيث تظهر الثلاثيات الناتجة في قاعدة بيانات المعرفة، وترجع نتيجة واحدة لكل مجموعة من المتغيرات التي تعثر عليها. WHERE المتغيرات التي تريد إرجاعها (تبدأ المتغيرات بعلامة استفهام)، وتحتوي جملة SELECTتسرد جملة : كائن، ومسند، وموضوعيمكن قراءة الثلاثي كجملة (وهذا هو السبب في أنه ينتهي بنقطة)، مع } .sour tastes ?fruit .yellow hasColor ?fruit { WHERE ?fruit SELECTقد تتضمن نتائج هذا الاستعلام، على سبيل المثال، "ليمون"، في ويكي بيانات، معظم الخصائص هي خصائص "لديه"-نوع ; لذا قد يقرأ الاستعلام بدلا من ذلك: SPARQL basics A simple SPARQL query looks like this: } .?c f ?b .?b n m .?a y x { WHERE ?c ?b ?a SELECT clause contains restrictions on them, mostly in the form of triples. All information in Wikidata (and similar knowledge databases) is stored in the form of triples; when you run the query, the query service tries to fill in the variables with actual values so that the resulting triples appear in the knowledge database, and returns one result for each combination of variables it finds. WHERE clause lists variables that you want returned (variables start with a question mark), and the SELECTThe : object, and an predicate, a subjectA triple can be viewed as two vertices (alias 2 nodes, 2 resources) connected by an edge (an arc, a property) inside the vast directed (oriented) property multigraph which forms Wikidata. It can be read like a sentence (which is why it ends with a period), with a } .sour tastes ?fruit .yellow hasColor ?fruit { WHERE ?fruit SELECT The results for this query could include, for example, “lemon”. In Wikidata, most properties are “has”-kind properties, so the query might instead read: SPARQL basicsA simple SPARQL query looks like this: } .?c f ?b .?b n m .?a y x { WHERE ?c ?b ?a SELECT clause contains restrictions on them, mostly in the form of triples. All information in Wikidata (and similar knowledge databases) is stored in the form of triples; when you run the query, the query service tries to fill in the variables with actual values so that the resulting triples appear in the knowledge database, and returns one result for each combination of variables it finds. WHERE clause lists variables that you want returned (variables start with a question mark), and the SELECTThe : object, and an predicate, a subjectA triple can be read like a sentence (which is why it ends with a period), with a } .sour tastes ?fruit .yellow hasColor ?fruit { WHERE ?fruit SELECTThe results for this query could include, for example, “lemon”. In Wikidata, most properties are “has”-kind properties, so the query might instead read: SPARQL basicsA simple SPARQL query looks like this: } .?c f ?b .?b n m .?a y x { WHERE ?c ?b ?a SELECT clause contains restrictions on them, mostly in the form of triples. All information in Wikidata (and similar knowledge databases) is stored in the form of triples; when you run the query, the query service tries to fill in the variables with actual values so that the resulting triples appear in the knowledge database, and returns one result for each combination of variables it finds. WHERE clause lists variables that you want returned (variables start with a question mark), and the SELECTThe : object, and an predicate, a subjectA triple can be viewed as two vertices (alias 2 nodes, 2 resources) connected by an edge (an arc, a property) inside the vast directed (oriented) property multigraph which forms Wikidata. It can be read like a sentence (which is why it ends with a period), with a } .sour tastes ?fruit .yellow hasColor ?fruit { WHERE ?fruit SELECTThe results for this query could include, for example, “lemon”. In Wikidata, most properties are “has”-kind properties, so the query might instead read: יסודות SPARQLשאלת SPARQL פשוטה נראית ככה: } .?c f ?b .?b n m .?a y x { WHERE ?c ?b ?a SELECT מכילה מגבלות עליהם, בעיקר בצורת שלישיות. כל המידע בוויקינתונים (ומסדי נתוני ידע דומים) מאוחסן בצורת שלישיות, כשמריצים את השאילתה, שירות התשאול ינסה למלא את המשתנים בערכים בפועל כדי שהשלישיות המתקבלות תופענה במסד נתוני הידע ותוחזרנה תוצאה אחת לכל צירוף משתנים שנמצאו. WHERE כוללת את המשתנים שנרצה להחזיר (משתנים מתחילים בסימן שאלה), והפסוקית SELECTהפסוקית (object): עצם (predicate) ונשוא (subject), נושאשלישייה יכולה להיות כמו משפט (לכן היא מסתיימת בנקודה) עם } .sour tastes ?fruit .yellow hasColor ?fruit { WHERE ?fruit SELECTהתוצאות לשאילתה הזאת יכולות לכלול, למשל, „לימון”. בוויקינתונים, רוב המאפיינים הם מסוג „יש” (has), לכן השאילתה יכולה להיראות כך: SPARQL basics A simple SPARQL query looks like this: } .?c f ?b .?b n m .?a y x { WHERE ?c ?b ?a SELECT clause contains restrictions on them, mostly in the form of triples. All information in Wikidata (and similar knowledge databases) is stored in the form of triples; when you run the query, the query service tries to fill in the variables with actual values so that the resulting triples appear in the knowledge database, and returns one result for each combination of variables it finds. WHERE clause lists variables that you want returned (variables start with a question mark), and the SELECTThe : object, and an predicate, a subjectA triple can be viewed as two vertices (alias 2 nodes, 2 resources) connected by an edge (an arc, a property) inside the vast directed (oriented) property multigraph which forms Wikidata. It can be read like a sentence (which is why it ends with a period), with a } .sour tastes ?fruit .yellow hasColor ?fruit { WHERE ?fruit SELECT The results for this query could include, for example, “lemon”. In Wikidata, most properties are “has”-kind properties, so the query might instead read: SPARQLの基本シンプルなSPARQLクエリは次のようなものです。 } .?c f ?b .?b n m .?a y x { WHERE ?c ?b ?a SELECT節はそれらの変数に対する制約からなり、ほとんどの場合はトリプルの形をとります。Wikidata(および類似の知識データベース)のすべての情報は、トリプルの形で保存されています。クエリが実行されると、クエリサービスは得たいトリプルの制約を満たすような変数の値を知識データベース上に見つけようと試みます。そしてそのような変数の組み合わせが見つかるごとに、それをひとつの結果として返します。 WHERE節にはクエリの結果として得たい変数を列挙します(変数はクエスチョン・マークで始まります)。SELECT を持つ文のように読むことができます(トリプルがピリオドで終わるのはそのためです)。 目的語、述語、主語トリプルは } .sour tastes ?fruit .yellow hasColor ?fruit { WHERE ?fruit SELECTこのクエリの回答は、例えば “lemon” です。Wikidataでは、ほとんどのプロパティは “has” の性質を持つプロパティです。そのためこのクエリは以下のように書いてもいいでしょう。 SPARQL basics A simple SPARQL query looks like this: } .?c f ?b .?b n m .?a y x { WHERE ?c ?b ?a SELECT clause contains restrictions on them, mostly in the form of triples. All information in Wikidata (and similar knowledge databases) is stored in the form of triples; when you run the query, the query service tries to fill in the variables with actual values so that the resulting triples appear in the knowledge database, and returns one result for each combination of variables it finds. WHERE clause lists variables that you want returned (variables start with a question mark), and the SELECTThe : object, and an predicate, a subjectA triple can be viewed as two vertices (alias 2 nodes, 2 resources) connected by an edge (an arc, a property) inside the vast directed (oriented) property multigraph which forms Wikidata. It can be read like a sentence (which is why it ends with a period), with a } .sour tastes ?fruit .yellow hasColor ?fruit { WHERE ?fruit SELECT The results for this query could include, for example, “lemon”. In Wikidata, most properties are “has”-kind properties, so the query might instead read: SPARQL basisEen eenvoudige SPARQL-query kan er zo uitzien: } .?c f ?b .?b n m .?a y x { WHERE ?c ?b ?a SELECT clause bevat de beperkingen, meestal in de vorm van tripels. Alle informatie in Wikidata (en vergelijkbare kennisdatabases) wordt opgeslagen in de vorm van tripels; Wanneer u de query uitvoert, probeert de queryservice de variabelen in te vullen met werkelijke waarden, zodat de resulterende triples worden weergegeven in de kennisdatabase en één resultaat retourneert voor elke combinatie van variabelen die wordt gevonden. WHERE clause geeft de variabele aan die u wilt opvragen (elke variabele begint met een vraagteken), en de SELECTDe : object en een predicaat, een onderwerpEen tripel kan worden gezien als twee hoekpunten (alias 2 knooppunten, 2 bronnen) verbonden door een rand (een boog, een eigenschap) binnen de gerichte (georiënteerde) eigenschapsmultigraaf die Wikidata vormt. Het kan worden gelezen als een zin (daarom eindigt het met een punt), met een } .sour tastes ?fruit .yellow hasColor ?fruit { WHERE ?fruit SELECTHet resultaat van deze query kan bijvoorbeeld "lemon" bevatten. In Wikidata zijn de meeste eigenschappen eigenschappen van het soort "has", dus de query kan in plaats daarvan luiden: Основы SPARQLПростой SPARQL-запрос выглядит следующим образом: } .?c f ?b .?b n m .?a y x { WHERE ?c ?b ?a SELECT перечислены переменные, которые вы хотите получить в результате запроса (переменные начинаются со знака вопроса). В секции WHERE содержатся условия, уточняющие их, в основном в виде троек. Вся информация в Викиданных (и аналогичных базах данных знаний) хранится в виде троек; когда вы запускаете запрос, служба запроса пытается заполнить переменные фактическими значениями, чтобы получаемые тройки присутствовали в базе данных знаний, и возвращает один результат для каждой комбинации переменных, которую она находит. SELECTВ секции Тройку можно рассматривать как предложение (поэтому она заканчивается точкой), содержащее "субъект", "предикат" и "объект": } .sour tastes ?fruit .yellow hasColor ?fruit { WHERE ?fruit SELECTРезультаты этого запроса могут включать, например, «лимон». В Викиданных большинство свойств подразумевают «имеет», так что запрос можно прочитать так: SPARQL basics A simple SPARQL query looks like this: } .?c f ?b .?b n m .?a y x { WHERE ?c ?b ?a SELECT clause contains restrictions on them, mostly in the form of triples. All information in Wikidata (and similar knowledge databases) is stored in the form of triples; when you run the query, the query service tries to fill in the variables with actual values so that the resulting triples appear in the knowledge database, and returns one result for each combination of variables it finds. WHERE clause lists variables that you want returned (variables start with a question mark), and the SELECTThe : object, and an predicate, a subjectA triple can be viewed as two vertices (alias 2 nodes, 2 resources) connected by an edge (an arc, a property) inside the vast directed (oriented) property multigraph which forms Wikidata. It can be read like a sentence (which is why it ends with a period), with a } .sour tastes ?fruit .yellow hasColor ?fruit { WHERE ?fruit SELECT The results for this query could include, for example, “lemon”. In Wikidata, most properties are “has”-kind properties, so the query might instead read: SPARQL basics A simple SPARQL query looks like this: } .?c f ?b .?b n m .?a y x { WHERE ?c ?b ?a SELECT clause contains restrictions on them, mostly in the form of triples. All information in Wikidata (and similar knowledge databases) is stored in the form of triples; when you run the query, the query service tries to fill in the variables with actual values so that the resulting triples appear in the knowledge database, and returns one result for each combination of variables it finds. WHERE clause lists variables that you want returned (variables start with a question mark), and the SELECTThe : object, and an predicate, a subjectA triple can be viewed as two vertices (alias 2 nodes, 2 resources) connected by an edge (an arc, a property) inside the vast directed (oriented) property multigraph which forms Wikidata. It can be read like a sentence (which is why it ends with a period), with a } .sour tastes ?fruit .yellow hasColor ?fruit { WHERE ?fruit SELECT The results for this query could include, for example, “lemon”. In Wikidata, most properties are “has”-kind properties, so the query might instead read: Основи SPARQLПростий запит SPARQL виглядає так: } .?c f ?b .?b n m .?a y x { WHERE ?c ?b ?a SELECT містить обмеження на них, переважно у формі триплетів. Уся інформація у Вікіданих (і аналогічних базах даних знань) зберігається у вигляді триплетів; коли ви запускаєте запит, служба запитів намагається заповнити змінні фактичними значеннями, так, як отримані триплети з'являються в базі знань, і повертає один результат для кожної комбінації змінних, які вона знаходить. WHERE перераховує змінні, які ви хочете повернути (змінні починаються із знака питання), а пункт SELECTПункт ): object (додатком, об'єктом) і predicate (присудком, предикатом), subject (підметом, суб'єктомТриплет можна розглядати як дві вершини (псевдоніми — два вузли, два ресурси), з’єднані ребром (дугою, властивістю) всередині величезного орієнтованого (спрямованого) мультиграфа властивостей, який утворює Вікідані. Його можна читати як речення (тому він закінчується крапкою), з } .sour tastes ?fruit .yellow hasColor ?fruit { WHERE ?fruit SELECTРезультати для цього запиту можуть включати, наприклад, «лимон». У Вікіданих більшість властивостей є властивостями типу «має» («has»), тому запит можна читати навпаки:

Use at

SELECT ?fruit
WHERE
{
  ?fruit color yellow.
  ?fruit taste sour.
}

Query found at