<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://info216.wiki.uib.no/index.php?action=history&amp;feed=atom&amp;title=Lab%3A_SPARQL_2</id>
	<title>Lab: SPARQL 2 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://info216.wiki.uib.no/index.php?action=history&amp;feed=atom&amp;title=Lab%3A_SPARQL_2"/>
	<link rel="alternate" type="text/html" href="http://info216.wiki.uib.no/index.php?title=Lab:_SPARQL_2&amp;action=history"/>
	<updated>2026-05-26T02:19:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>http://info216.wiki.uib.no/index.php?title=Lab:_SPARQL_2&amp;diff=2426&amp;oldid=prev</id>
		<title>Bamos3003: Created page with &quot;==Topics== * SPARQL updates * SPARQL insertions * SPARQL deletions * DESCRIBE and CONSTRUCT  ==Useful materials== GraphDB documentation: * [https://graphdb.ontotext.com/docume...&quot;</title>
		<link rel="alternate" type="text/html" href="http://info216.wiki.uib.no/index.php?title=Lab:_SPARQL_2&amp;diff=2426&amp;oldid=prev"/>
		<updated>2024-02-11T10:52:37Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Topics== * SPARQL updates * SPARQL insertions * SPARQL deletions * DESCRIBE and CONSTRUCT  ==Useful materials== GraphDB documentation: * [https://graphdb.ontotext.com/docume...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Topics==&lt;br /&gt;
* SPARQL updates&lt;br /&gt;
* SPARQL insertions&lt;br /&gt;
* SPARQL deletions&lt;br /&gt;
* DESCRIBE and CONSTRUCT&lt;br /&gt;
&lt;br /&gt;
==Useful materials==&lt;br /&gt;
GraphDB documentation:&lt;br /&gt;
* [https://graphdb.ontotext.com/documentation/10.0/quick-start-guide.html GraphDB 10.0 Quick Start Guide]&lt;br /&gt;
* [https://graphdb.ontotext.com/documentation/10.5/ GraphDB 10.5 Documentation]&lt;br /&gt;
&lt;br /&gt;
SPARQL reference:&lt;br /&gt;
* [https://www.w3.org/TR/sparql11-query/ SPARQL Query Documentation]&lt;br /&gt;
* [http://www.w3.org/TR/sparql11-update/ SPARQL Update Documentation]&lt;br /&gt;
* [https://en.wikibooks.org/wiki/SPARQL/Expressions_and_Functions SPARQL Expressions and Functions]&lt;br /&gt;
&lt;br /&gt;
==Tasks==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Task:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Write the following SPARQL updates:&lt;br /&gt;
* The &amp;#039;&amp;#039;muellerkg:name&amp;#039;&amp;#039; property is misnamed, because the object in those triples is always a resource. Rename it to something like &amp;#039;&amp;#039;muellerkg:person&amp;#039;&amp;#039;.&lt;br /&gt;
* Update the graph so all the investigated person and president nodes (such as &amp;#039;&amp;#039;muellerkg:G._Gordon_Liddy&amp;#039;&amp;#039; and  &amp;#039;&amp;#039;muellerkg:Richard_Nizon&amp;#039;&amp;#039;) become the subjects in &amp;#039;&amp;#039;foaf:name&amp;#039;&amp;#039; triples with the corresponding strings (&amp;#039;&amp;#039;G. Gordon Liddy&amp;#039;&amp;#039; and &amp;#039;&amp;#039;Richard Nixon&amp;#039;&amp;#039;) as the literals. (&amp;#039;&amp;#039;Tip:&amp;#039;&amp;#039; Use &amp;#039;&amp;#039;STR(kgmueller:)&amp;#039;&amp;#039; inside a REPLACE in a BIND statement to remove the URI path.)&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Task:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Load the RDF graph you created in exercises 1 and 2. (Maybe you want to create a new namespace in GraphDB first.) Use INSERT DATA updates to add these triples to your graph:&lt;br /&gt;
* George Papadopoulos was adviser to the Trump campaign.&lt;br /&gt;
** He pleaded guilty to lying to the FBI.&lt;br /&gt;
** He was sentenced to prison. &lt;br /&gt;
* Roger Stone is a Republican.&lt;br /&gt;
** He was adviser to Trump.&lt;br /&gt;
** He was an official in the Trump campaign.&lt;br /&gt;
** He interacted with Wikileaks.&lt;br /&gt;
** He made a testimony for the House Intelligence Committee.&lt;br /&gt;
** He was cleared of all charges.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Task:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Use DELETE DATA and then INSERT DATA updates to correct that Roger Stone was cleared of all charges. Actually,&lt;br /&gt;
* He was indicted for making false statements, witness tampering, and obstruction of justice.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Task:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Use a DESCRIBE query to show the updated information about Roger Stone.&lt;br /&gt;
* Use a CONSTRUCT query to create a new RDF group with triples only about Roger Stone (in other words, having Roger Stone as the subject.)&lt;br /&gt;
&lt;br /&gt;
==If you have more time==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Task:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
In the &amp;#039;&amp;#039;russia_investigation_kg.ttl&amp;#039;&amp;#039; dataset, the &amp;#039;&amp;#039;muellerkg:name&amp;#039;&amp;#039; property used as predicate is already covered by a standard term from an estalished vocabulary in the LOD cloud: &amp;#039;&amp;#039;foaf:name&amp;#039;&amp;#039;, where &amp;#039;&amp;#039;foaf:&amp;#039;&amp;#039; is &amp;#039;&amp;#039;http://xmlns.com/foaf/0.1/&amp;#039;&amp;#039;. &lt;br /&gt;
* If you have not done so already: write a SPARQL DELETE/INSERT update to change every &amp;#039;&amp;#039;muellerkg:name&amp;#039;&amp;#039; predicate in your graph to &amp;#039;&amp;#039;foaf:name&amp;#039;&amp;#039;. (It is easy to destroy your RDF graph when you do this, so it is good you saved a copy in the previous task.)&lt;br /&gt;
* Otherwise: find another resource to rename everywhere. For example, you can change your local URI for a public person to a standard [https://wikidata.org Wikidata] URI.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Task:&amp;#039;&amp;#039;&amp;#039; Write a DELETE/INSERT statement to change one of the prefixes in your graph, renaming all the resources that use that prefix.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Task:&amp;#039;&amp;#039;&amp;#039; Write an INSERT statement to add at least one significant date to the Mueller investigation, with literal type xsd:date. Write a DELETE/INSERT statement to change the date to a string, and a new DELETE/INSERT statement to change it back to xsd:date.&lt;/div&gt;</summary>
		<author><name>Bamos3003</name></author>
	</entry>
</feed>