<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://semwebquality.org/mediawiki/skins/common/feed.css?301"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://semwebquality.org/mediawiki/index.php?feed=atom&amp;target=Cfuerber&amp;title=Special%3AContributions</id>
		<title>SemWebQuality.org - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://semwebquality.org/mediawiki/index.php?feed=atom&amp;target=Cfuerber&amp;title=Special%3AContributions"/>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Special:Contributions/Cfuerber"/>
		<updated>2026-04-11T11:59:26Z</updated>
		<subtitle>From SemWebQuality.org</subtitle>
		<generator>MediaWiki 1.17.0</generator>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Semantic_Web_Quality_Wiki:About</id>
		<title>Semantic Web Quality Wiki:About</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Semantic_Web_Quality_Wiki:About"/>
				<updated>2015-08-27T17:37:24Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SemWebQuality.org is a project dedicated to investigate the usefulness of Semantic Web technologies for data quality management.&lt;br /&gt;
&lt;br /&gt;
This server is being operated by&lt;br /&gt;
&lt;br /&gt;
Dr. Christian Fürber&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://iqinstitute.de Information Quality Institute GmbH]&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Blumenstr. 3&amp;lt;br /&amp;gt;&lt;br /&gt;
D-85540 Haar, Germany&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Phone:''' +49 89 / 2155 4432-0&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Fax:''' +49 89 / 2155 4432-9&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''E-mail:''' c.fuerber(at)iqinstitute.de&lt;br /&gt;
&lt;br /&gt;
'''Website:''' [https://www.iqinstitute.de/ www.iqinstitute.de]&lt;br /&gt;
&lt;br /&gt;
'''Blog:''' [https://www.iqinstitute.de/blog Information Quality Insider]&lt;br /&gt;
&lt;br /&gt;
'''Imprint:''' [https://iqinstitute.de/impressum/ Impressum]&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Semantic_Web_Quality_Wiki:About</id>
		<title>Semantic Web Quality Wiki:About</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Semantic_Web_Quality_Wiki:About"/>
				<updated>2015-08-27T17:36:50Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SemWebQuality.org is a project dedicated to investigate the usefulness of Semantic Web technologies for data quality management.&lt;br /&gt;
&lt;br /&gt;
This server is being operated by&lt;br /&gt;
&lt;br /&gt;
Dr. Christian Fürber&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://iqinstitute.de Information Quality Institute GmbH]&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Blumenstr. 3&amp;lt;br /&amp;gt;&lt;br /&gt;
D-85540 Haar, Germany&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Phone:''' +49 89 / 2155 4432-0&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Fax:''' +49 89 / 2155 4432-0&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''E-mail:''' c.fuerber(at)iqinstitute.de&lt;br /&gt;
&lt;br /&gt;
'''Website:''' https://www.iqinstitute.de/&lt;br /&gt;
&lt;br /&gt;
'''Blog:''' [https://www.iqinstitute.de/blog Information Quality Insider]&lt;br /&gt;
&lt;br /&gt;
'''Imprint:''' [https://iqinstitute.de/impressum/ Impressum]&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Semantic_Web_Quality_Wiki:About</id>
		<title>Semantic Web Quality Wiki:About</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Semantic_Web_Quality_Wiki:About"/>
				<updated>2015-08-27T17:36:29Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SemWebQuality.org is a project dedicated to investigate the usefulness of Semantic Web technologies for data quality management.&lt;br /&gt;
&lt;br /&gt;
This server is being operated by&lt;br /&gt;
&lt;br /&gt;
Dr. Christian Fürber&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://iqinstitute.de Information Quality Institute GmbH]&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Blumenstr. 3&amp;lt;br /&amp;gt;&lt;br /&gt;
D-85540 Haar, Germany&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Phone:''' +49 89 / 2155 4432-0&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Fax:''' +49 89 / 2155 4432-0&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''E-mail:''' c.fuerber(at)iqinstitute.de&lt;br /&gt;
&lt;br /&gt;
'''Website:''' [https://www.iqinstitute.de/]&lt;br /&gt;
&lt;br /&gt;
'''Blog:''' [https://www.iqinstitute.de/blog Information Quality Insider]&lt;br /&gt;
&lt;br /&gt;
'''Imprint:''' [https://iqinstitute.de/impressum/ Impressum]&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Semantic_Web_Quality_Wiki:About</id>
		<title>Semantic Web Quality Wiki:About</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Semantic_Web_Quality_Wiki:About"/>
				<updated>2015-08-27T17:35:42Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SemWebQuality.org is a project dedicated to investigate the usefulness of Semantic Web technologies for data quality management.&lt;br /&gt;
&lt;br /&gt;
This server is being operated by&lt;br /&gt;
&lt;br /&gt;
Dr. Christian Fürber&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://iqinstitute.de Information Quality Institute GmbH]&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Blumenstr. 3&amp;lt;br /&amp;gt;&lt;br /&gt;
D-85540 Haar, Germany&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Phone:''' +49 89 / 2155 4432-0&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Fax:''' +49 89 / 2155 4432-0&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''E-mail:''' c.fuerber(at)iqinstitute.de&lt;br /&gt;
&lt;br /&gt;
'''Website:''' [https://www.iqinstitute.de/blog Information Quality Insider]&lt;br /&gt;
&lt;br /&gt;
'''Imprint:''' [https://iqinstitute.de/impressum/ Impressum]&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks</id>
		<title>Data Requirements Consistency Checks</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks"/>
				<updated>2015-02-27T12:37:43Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Contradictory Unique Value Rules==&lt;br /&gt;
&lt;br /&gt;
'''With generic superproperty'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX rdfs:&amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SELECT &lt;br /&gt;
(?genprop AS ?GenericProperty) &lt;br /&gt;
(?dr1 AS ?UniqueRequirement) &lt;br /&gt;
(?dr2 AS ?NonUniqueRequirement)&lt;br /&gt;
WHERE{&lt;br /&gt;
?dr1 a dqm:UniqueValueRule .&lt;br /&gt;
?dr1 dqm:testedClass ?class1 .&lt;br /&gt;
?class1 rdfs:subClassOf ?genclass .&lt;br /&gt;
?class1 dqm:hasURI ?class1URI .&lt;br /&gt;
?dr1 dqm:testedProperty1 ?prop1 .&lt;br /&gt;
?prop1 rdfs:subPropertyOf ?genprop .&lt;br /&gt;
?prop1 dqm:hasURI ?prop1URI .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
   ?dr2 a dqm:PropertyRequirement .&lt;br /&gt;
   ?dr2 dqm:testedClass ?class2 .&lt;br /&gt;
   ?class2 rdfs:subClassOf ?genclass .&lt;br /&gt;
   ?class2 dqm:hasURI ?class2URI .&lt;br /&gt;
   ?dr2 dqm:testedProperty1 ?prop2 .&lt;br /&gt;
   ?prop2 rdfs:subPropertyOf ?genprop .&lt;br /&gt;
   ?prop2 dqm:hasURI ?prop2URI .&lt;br /&gt;
   FILTER(?dr1 != ?dr2)&lt;br /&gt;
   MINUS{&lt;br /&gt;
      ?dr2 a dqm:UniqueValueRule&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
FILTER(bound(?dr2))&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
'''Without generic superproperty'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?dr1 AS ?UniqueValueRequirement) (?dr2 AS ?InconsistentRequirement)&lt;br /&gt;
WHERE{&lt;br /&gt;
?dr1 a dqm:UniqueValueRule .&lt;br /&gt;
?dr1 dqm:testedClass ?class1 .&lt;br /&gt;
?class1 dqm:hasURI ?class1URI .&lt;br /&gt;
?dr1 dqm:testedProperty1 ?prop1 .&lt;br /&gt;
?prop1 dqm:hasURI ?prop1URI .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
   ?dr2 a dqm:PropertyRequirement .&lt;br /&gt;
   ?dr2 dqm:testedClass ?class2 .&lt;br /&gt;
   ?class2 dqm:hasURI ?class2URI .&lt;br /&gt;
   ?dr2 dqm:testedProperty1 ?prop2 .&lt;br /&gt;
   ?prop2 dqm:hasURI ?prop2URI .&lt;br /&gt;
   FILTER(str(?prop1URI) = str(?prop2URI) &amp;amp;&amp;amp; str(?class1URI) = str(?class2URI) &amp;amp;&amp;amp; ?dr1 != ?dr2)&lt;br /&gt;
   MINUS{&lt;br /&gt;
      ?dr2 a dqm:UniqueValueRule&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
FILTER(bound(?prop2URI))&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Duplicate Property Requirements==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?tclassURI1 AS ?Class) (?tpropURI1 AS ?Property) (?dr1 AS ?DataRequirement)&lt;br /&gt;
WHERE {&lt;br /&gt;
   ?dr1 a dqm:PropertyRequirement .&lt;br /&gt;
   ?dr1 dqm:testedClass ?tclass1 .&lt;br /&gt;
   ?tclass1 dqm:hasURI ?tclassURI1 .   &lt;br /&gt;
   ?dr1 dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
   ?tprop1 dqm:hasURI ?tpropURI1 .&lt;br /&gt;
}&lt;br /&gt;
ORDER BY ?tclassURI1 ?tpropURI1 ?dr1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dr1 ?dr2&lt;br /&gt;
WHERE {&lt;br /&gt;
?dr1 a dqm:PropertyRequirement .&lt;br /&gt;
?dr1 dqm:testedClass ?tclass1 .&lt;br /&gt;
?tclass1 dqm:hasURI ?tclassURI1 .   &lt;br /&gt;
?dr1 dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropURI1 .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
?dr2 a dqm:PropertyRequirement .&lt;br /&gt;
?dr2 dqm:testedClass ?tclass2 .&lt;br /&gt;
?tclass2 dqm:hasURI ?tclassURI2 .   &lt;br /&gt;
?dr2 dqm:testedProperty1 ?tprop2 .&lt;br /&gt;
?tprop2 dqm:hasURI ?tpropURI2 .&lt;br /&gt;
FILTER(?dr1!=?dr2 &amp;amp;&amp;amp; str(?tclassURI1) = str(?tclassURI2) &amp;amp;&amp;amp; str(?tpropURI1) = str(?tpropURI2))&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks</id>
		<title>Data Requirements Consistency Checks</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks"/>
				<updated>2015-02-27T12:36:35Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Contradictory Unique Value Rules==&lt;br /&gt;
&lt;br /&gt;
'''With generic superproperty'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX rdfs:&amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SELECT (?genprop AS ?GenericProperty) (?dr1 AS ?UniqueRequirement) (?dr2 AS ?NonUniqueRequirement)&lt;br /&gt;
WHERE{&lt;br /&gt;
?dr1 a dqm:UniqueValueRule .&lt;br /&gt;
?dr1 dqm:testedClass ?class1 .&lt;br /&gt;
?class1 rdfs:subClassOf ?genclass .&lt;br /&gt;
?class1 dqm:hasURI ?class1URI .&lt;br /&gt;
?dr1 dqm:testedProperty1 ?prop1 .&lt;br /&gt;
?prop1 rdfs:subPropertyOf ?genprop .&lt;br /&gt;
?prop1 dqm:hasURI ?prop1URI .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
   ?dr2 a dqm:PropertyRequirement .&lt;br /&gt;
   ?dr2 dqm:testedClass ?class2 .&lt;br /&gt;
   ?class2 rdfs:subClassOf ?genclass .&lt;br /&gt;
   ?class2 dqm:hasURI ?class2URI .&lt;br /&gt;
   ?dr2 dqm:testedProperty1 ?prop2 .&lt;br /&gt;
   ?prop2 rdfs:subPropertyOf ?genprop .&lt;br /&gt;
   ?prop2 dqm:hasURI ?prop2URI .&lt;br /&gt;
   FILTER(?dr1 != ?dr2)&lt;br /&gt;
   MINUS{&lt;br /&gt;
      ?dr2 a dqm:UniqueValueRule&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
FILTER(bound(?dr2))&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
'''Without generic superproperty'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?dr1 AS ?UniqueValueRequirement) (?dr2 AS ?InconsistentRequirement)&lt;br /&gt;
WHERE{&lt;br /&gt;
?dr1 a dqm:UniqueValueRule .&lt;br /&gt;
?dr1 dqm:testedClass ?class1 .&lt;br /&gt;
?class1 dqm:hasURI ?class1URI .&lt;br /&gt;
?dr1 dqm:testedProperty1 ?prop1 .&lt;br /&gt;
?prop1 dqm:hasURI ?prop1URI .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
   ?dr2 a dqm:PropertyRequirement .&lt;br /&gt;
   ?dr2 dqm:testedClass ?class2 .&lt;br /&gt;
   ?class2 dqm:hasURI ?class2URI .&lt;br /&gt;
   ?dr2 dqm:testedProperty1 ?prop2 .&lt;br /&gt;
   ?prop2 dqm:hasURI ?prop2URI .&lt;br /&gt;
   FILTER(str(?prop1URI) = str(?prop2URI) &amp;amp;&amp;amp; str(?class1URI) = str(?class2URI) &amp;amp;&amp;amp; ?dr1 != ?dr2)&lt;br /&gt;
   MINUS{&lt;br /&gt;
      ?dr2 a dqm:UniqueValueRule&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
FILTER(bound(?prop2URI))&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Duplicate Property Requirements==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?tclassURI1 AS ?Class) (?tpropURI1 AS ?Property) (?dr1 AS ?DataRequirement)&lt;br /&gt;
WHERE {&lt;br /&gt;
   ?dr1 a dqm:PropertyRequirement .&lt;br /&gt;
   ?dr1 dqm:testedClass ?tclass1 .&lt;br /&gt;
   ?tclass1 dqm:hasURI ?tclassURI1 .   &lt;br /&gt;
   ?dr1 dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
   ?tprop1 dqm:hasURI ?tpropURI1 .&lt;br /&gt;
}&lt;br /&gt;
ORDER BY ?tclassURI1 ?tpropURI1 ?dr1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dr1 ?dr2&lt;br /&gt;
WHERE {&lt;br /&gt;
?dr1 a dqm:PropertyRequirement .&lt;br /&gt;
?dr1 dqm:testedClass ?tclass1 .&lt;br /&gt;
?tclass1 dqm:hasURI ?tclassURI1 .   &lt;br /&gt;
?dr1 dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropURI1 .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
?dr2 a dqm:PropertyRequirement .&lt;br /&gt;
?dr2 dqm:testedClass ?tclass2 .&lt;br /&gt;
?tclass2 dqm:hasURI ?tclassURI2 .   &lt;br /&gt;
?dr2 dqm:testedProperty1 ?tprop2 .&lt;br /&gt;
?tprop2 dqm:hasURI ?tpropURI2 .&lt;br /&gt;
FILTER(?dr1!=?dr2 &amp;amp;&amp;amp; str(?tclassURI1) = str(?tclassURI2) &amp;amp;&amp;amp; str(?tpropURI1) = str(?tpropURI2))&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks</id>
		<title>Data Requirements Consistency Checks</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks"/>
				<updated>2015-02-27T12:35:19Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Contradictory Unique Value Rules==&lt;br /&gt;
&lt;br /&gt;
'''Without generic superproperty'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX rdfs:&amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SELECT (?dr1 AS ?UniqueRequirement) (?dr2 AS ?NonUniqueRequirement)&lt;br /&gt;
WHERE{&lt;br /&gt;
?dr1 a dqm:UniqueValueRule .&lt;br /&gt;
?dr1 dqm:testedClass ?class1 .&lt;br /&gt;
?class1 rdfs:subClassOf ?genclass .&lt;br /&gt;
?class1 dqm:hasURI ?class1URI .&lt;br /&gt;
?dr1 dqm:testedProperty1 ?prop1 .&lt;br /&gt;
?prop1 rdfs:subPropertyOf ?genprop .&lt;br /&gt;
?prop1 dqm:hasURI ?prop1URI .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
   ?dr2 a dqm:PropertyRequirement .&lt;br /&gt;
   ?dr2 dqm:testedClass ?class2 .&lt;br /&gt;
   ?class2 rdfs:subClassOf ?genclass .&lt;br /&gt;
   ?class2 dqm:hasURI ?class2URI .&lt;br /&gt;
   ?dr2 dqm:testedProperty1 ?prop2 .&lt;br /&gt;
   ?prop2 rdfs:subPropertyOf ?genprop .&lt;br /&gt;
   ?prop2 dqm:hasURI ?prop2URI .&lt;br /&gt;
   FILTER(?dr1 != ?dr2)&lt;br /&gt;
   MINUS{&lt;br /&gt;
      ?dr2 a dqm:UniqueValueRule&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
FILTER(bound(?dr2))&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
'''Without generic superproperty'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?dr1 AS ?UniqueValueRequirement) (?dr2 AS ?InconsistentRequirement)&lt;br /&gt;
WHERE{&lt;br /&gt;
?dr1 a dqm:UniqueValueRule .&lt;br /&gt;
?dr1 dqm:testedClass ?class1 .&lt;br /&gt;
?class1 dqm:hasURI ?class1URI .&lt;br /&gt;
?dr1 dqm:testedProperty1 ?prop1 .&lt;br /&gt;
?prop1 dqm:hasURI ?prop1URI .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
   ?dr2 a dqm:PropertyRequirement .&lt;br /&gt;
   ?dr2 dqm:testedClass ?class2 .&lt;br /&gt;
   ?class2 dqm:hasURI ?class2URI .&lt;br /&gt;
   ?dr2 dqm:testedProperty1 ?prop2 .&lt;br /&gt;
   ?prop2 dqm:hasURI ?prop2URI .&lt;br /&gt;
   FILTER(str(?prop1URI) = str(?prop2URI) &amp;amp;&amp;amp; str(?class1URI) = str(?class2URI) &amp;amp;&amp;amp; ?dr1 != ?dr2)&lt;br /&gt;
   MINUS{&lt;br /&gt;
      ?dr2 a dqm:UniqueValueRule&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
FILTER(bound(?prop2URI))&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Duplicate Property Requirements==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?tclassURI1 AS ?Class) (?tpropURI1 AS ?Property) (?dr1 AS ?DataRequirement)&lt;br /&gt;
WHERE {&lt;br /&gt;
   ?dr1 a dqm:PropertyRequirement .&lt;br /&gt;
   ?dr1 dqm:testedClass ?tclass1 .&lt;br /&gt;
   ?tclass1 dqm:hasURI ?tclassURI1 .   &lt;br /&gt;
   ?dr1 dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
   ?tprop1 dqm:hasURI ?tpropURI1 .&lt;br /&gt;
}&lt;br /&gt;
ORDER BY ?tclassURI1 ?tpropURI1 ?dr1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dr1 ?dr2&lt;br /&gt;
WHERE {&lt;br /&gt;
?dr1 a dqm:PropertyRequirement .&lt;br /&gt;
?dr1 dqm:testedClass ?tclass1 .&lt;br /&gt;
?tclass1 dqm:hasURI ?tclassURI1 .   &lt;br /&gt;
?dr1 dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropURI1 .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
?dr2 a dqm:PropertyRequirement .&lt;br /&gt;
?dr2 dqm:testedClass ?tclass2 .&lt;br /&gt;
?tclass2 dqm:hasURI ?tclassURI2 .   &lt;br /&gt;
?dr2 dqm:testedProperty1 ?tprop2 .&lt;br /&gt;
?tprop2 dqm:hasURI ?tpropURI2 .&lt;br /&gt;
FILTER(?dr1!=?dr2 &amp;amp;&amp;amp; str(?tclassURI1) = str(?tclassURI2) &amp;amp;&amp;amp; str(?tpropURI1) = str(?tpropURI2))&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks</id>
		<title>Data Requirements Consistency Checks</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks"/>
				<updated>2015-02-27T12:34:59Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Contradictory Unique Value Rules==&lt;br /&gt;
&lt;br /&gt;
'''Without generic superproperty'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
prefix rdfs:&amp;lt;http://www.w3.org/2000/01/rdf-schema#&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SELECT (?dr1 AS ?UniqueRequirement) (?dr2 AS ?NonUniqueRequirement)&lt;br /&gt;
WHERE{&lt;br /&gt;
?dr1 a dqm:UniqueValueRule .&lt;br /&gt;
?dr1 dqm:testedClass ?class1 .&lt;br /&gt;
?class1 rdfs:subClassOf ?genclass .&lt;br /&gt;
?class1 dqm:hasURI ?class1URI .&lt;br /&gt;
?dr1 dqm:testedProperty1 ?prop1 .&lt;br /&gt;
?prop1 rdfs:subPropertyOf ?genprop .&lt;br /&gt;
?prop1 dqm:hasURI ?prop1URI .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
   ?dr2 a dqm:PropertyRequirement .&lt;br /&gt;
   ?dr2 dqm:testedClass ?class2 .&lt;br /&gt;
   ?class2 rdfs:subClassOf ?genclass .&lt;br /&gt;
   ?class2 dqm:hasURI ?class2URI .&lt;br /&gt;
   ?dr2 dqm:testedProperty1 ?prop2 .&lt;br /&gt;
   ?prop2 rdfs:subPropertyOf ?genprop .&lt;br /&gt;
   ?prop2 dqm:hasURI ?prop2URI .&lt;br /&gt;
   FILTER(?dr1 != ?dr2)&lt;br /&gt;
   MINUS{&lt;br /&gt;
      ?dr2 a dqm:UniqueValueRule&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
FILTER(bound(?dr2))&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
'''Without generic superproperty'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?dr1 AS ?UniqueValueRequirement) (?dr2 AS ?InconsistentRequirement)&lt;br /&gt;
WHERE{&lt;br /&gt;
?dr1 a dqm:UniqueValueRule .&lt;br /&gt;
?dr1 dqm:testedClass ?class1 .&lt;br /&gt;
?class1 dqm:hasURI ?class1URI .&lt;br /&gt;
?dr1 dqm:testedProperty1 ?prop1 .&lt;br /&gt;
?prop1 dqm:hasURI ?prop1URI .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
   ?dr2 a dqm:PropertyRequirement .&lt;br /&gt;
   ?dr2 dqm:testedClass ?class2 .&lt;br /&gt;
   ?class2 dqm:hasURI ?class2URI .&lt;br /&gt;
   ?dr2 dqm:testedProperty1 ?prop2 .&lt;br /&gt;
   ?prop2 dqm:hasURI ?prop2URI .&lt;br /&gt;
   FILTER(str(?prop1URI) = str(?prop2URI) &amp;amp;&amp;amp; str(?class1URI) = str(?class2URI) &amp;amp;&amp;amp; ?dr1 != ?dr2)&lt;br /&gt;
   MINUS{&lt;br /&gt;
      ?dr2 a dqm:UniqueValueRule&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
FILTER(bound(?prop2URI))&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Duplicate Property Requirements==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?tclassURI1 AS ?Class) (?tpropURI1 AS ?Property) (?dr1 AS ?DataRequirement)&lt;br /&gt;
WHERE {&lt;br /&gt;
   ?dr1 a dqm:PropertyRequirement .&lt;br /&gt;
   ?dr1 dqm:testedClass ?tclass1 .&lt;br /&gt;
   ?tclass1 dqm:hasURI ?tclassURI1 .   &lt;br /&gt;
   ?dr1 dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
   ?tprop1 dqm:hasURI ?tpropURI1 .&lt;br /&gt;
}&lt;br /&gt;
ORDER BY ?tclassURI1 ?tpropURI1 ?dr1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dr1 ?dr2&lt;br /&gt;
WHERE {&lt;br /&gt;
?dr1 a dqm:PropertyRequirement .&lt;br /&gt;
?dr1 dqm:testedClass ?tclass1 .&lt;br /&gt;
?tclass1 dqm:hasURI ?tclassURI1 .   &lt;br /&gt;
?dr1 dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropURI1 .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
?dr2 a dqm:PropertyRequirement .&lt;br /&gt;
?dr2 dqm:testedClass ?tclass2 .&lt;br /&gt;
?tclass2 dqm:hasURI ?tclassURI2 .   &lt;br /&gt;
?dr2 dqm:testedProperty1 ?tprop2 .&lt;br /&gt;
?tprop2 dqm:hasURI ?tpropURI2 .&lt;br /&gt;
FILTER(?dr1!=?dr2 &amp;amp;&amp;amp; str(?tclassURI1) = str(?tclassURI2) &amp;amp;&amp;amp; str(?tpropURI1) = str(?tpropURI2))&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Semantic_Web_Quality_Wiki:About</id>
		<title>Semantic Web Quality Wiki:About</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Semantic_Web_Quality_Wiki:About"/>
				<updated>2012-12-06T11:18:04Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SemWebQuality.org is a project dedicated to investigate the usefulness of Semantic Web technologies for data quality management.&lt;br /&gt;
&lt;br /&gt;
This server is being operated by&lt;br /&gt;
&lt;br /&gt;
Dipl.-Kfm. Christian Fürber&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.unibw.de/ebusiness E-Business &amp;amp; Web Science Research Group]&amp;lt;br /&amp;gt;&lt;br /&gt;
Universität der Bundeswehr München&amp;lt;br /&amp;gt;&lt;br /&gt;
Werner-Heisenberg-Weg 39&amp;lt;br /&amp;gt;&lt;br /&gt;
D-85579 Neubiberg, Germany&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Phone:''' +49-89-6004-4218&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Fax:''' +49-89-6004-4620&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''E-mail:''' c.fuerber(at)unibw.de&lt;br /&gt;
&lt;br /&gt;
'''Personal Blog:''' [http://www.iqinstitute-gmbh.de/blog Information Quality Insider]&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Semantic_Web_Quality_Wiki:About</id>
		<title>Semantic Web Quality Wiki:About</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Semantic_Web_Quality_Wiki:About"/>
				<updated>2012-12-06T11:16:54Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SemWebQuality.org is a project dedicated to investigate the usefulness of Semantic Web technologies for data quality management.&lt;br /&gt;
&lt;br /&gt;
This server is being operated by&lt;br /&gt;
&lt;br /&gt;
Dipl.-Kfm. Christian Fürber&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.unibw.de/ebusiness E-Business &amp;amp; Web Science Research Group]&amp;lt;br /&amp;gt;&lt;br /&gt;
Universität der Bundeswehr München&amp;lt;br /&amp;gt;&lt;br /&gt;
Werner-Heisenberg-Weg 39&amp;lt;br /&amp;gt;&lt;br /&gt;
D-85579 Neubiberg, Germany&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Phone:''' +49-89-6004-4218&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Fax:''' +49-89-6004-4620&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''E-mail:''' c.fuerber(at)unibw.de&lt;br /&gt;
&lt;br /&gt;
'''Personal Blog:''' [http://www.iqinstitute-gmbh.de/blog]&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Semantic_Web_Quality_Wiki:About</id>
		<title>Semantic Web Quality Wiki:About</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Semantic_Web_Quality_Wiki:About"/>
				<updated>2012-12-06T11:16:24Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SemWebQuality.org is a project dedicated to investigate the usefulness of Semantic Web technologies for data quality management.&lt;br /&gt;
&lt;br /&gt;
This server is being operated by&lt;br /&gt;
&lt;br /&gt;
Dipl.-Kfm. Christian Fürber&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://www.unibw.de/ebusiness E-Business &amp;amp; Web Science Research Group]&amp;lt;br /&amp;gt;&lt;br /&gt;
Universität der Bundeswehr München&amp;lt;br /&amp;gt;&lt;br /&gt;
Werner-Heisenberg-Weg 39&amp;lt;br /&amp;gt;&lt;br /&gt;
D-85579 Neubiberg, Germany&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Phone:''' +49-89-6004-4218&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Fax:''' +49-89-6004-4620&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''E-mail:''' c.fuerber(at)unibw.de&lt;br /&gt;
&lt;br /&gt;
'''Personal Blog:&amp;quot;&amp;quot;&amp;quot; [http://www.iqinstitute-gmbh.de/blog]&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports</id>
		<title>Data Quality Assessment Reports</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports"/>
				<updated>2012-07-01T16:12:03Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Completeness (OWL Full) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data Quality Scores can be used to get a quick impression about the quality state of a data source. Below you can find queries that can calculate data quality scores based on pre-defined data requirements on the fly.&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
With the DQM-Vocabulary you can easily create Data Quality Scores. All you need is a SPARQL-Endpoint that supports SPARQL 1.1 or SPARQL extensions that cover datatype conversion and conversion of strings to URIs. Before you can automatically analyze your data for requirement violations, you need to perform the following steps:&lt;br /&gt;
* [[Create Data Requirements#Define Tested Elements|Declare the elements of your ontology that shall be used in the DQM-Vocabulary]]&lt;br /&gt;
* [[Create Data Requirements]]&lt;br /&gt;
&lt;br /&gt;
=Data Quality Score Calculations=&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL DL)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL Full)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL Full Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Depth==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of a property based on the ratio of all instances of a class and instances that have non-unique property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All unique value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness Scores per unique value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI ((COUNT(?i)/2) AS ?violations) (COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessDepth)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?uniqueValue1 .&lt;br /&gt;
    ?i2 ?tpropURI ?uniqueValue2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; (str(?uniqueValue1) = str(?uniqueValue2)))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Scope==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of class instances based on the ratio of all instances of a class and duplicate instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All duplicate instances rules (Example case: 3 tested Properties, OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness in scope scores for classes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI &lt;br /&gt;
((COUNT(?i)/2) AS ?violations)&lt;br /&gt;
(COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessScope)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI1 ?value11 .&lt;br /&gt;
    ?i2 ?tpropURI1 ?value12 . &lt;br /&gt;
    ?i ?tpropURI2 ?value21 . 			&lt;br /&gt;
    ?i2 ?tpropURI2 ?value22 . 			&lt;br /&gt;
    ?i ?tpropURI3 ?value31 . 			&lt;br /&gt;
    ?i2 ?tpropURI3 ?value32 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; str(?value11) = str(?value12) &amp;amp;&amp;amp; str(?value21) = str(?value22) &amp;amp;&amp;amp; str(?value31) = str(?value32))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntactic Accuracy==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Based on Syntax Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values with syntax rule violations.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All syntax rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per syntax rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are not listed as legal values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI &lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty1 ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?rpropvalue)) AS ?rpropURI) .&lt;br /&gt;
    BIND (IRI(str(?rclassvalue)) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?i2 a ?rclassURI .&lt;br /&gt;
        ?i2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Range Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are out of a legal range.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value range rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value range rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (STRDT(str(?value), xsd:float) &amp;gt; ?upperLimit || &lt;br /&gt;
    STRDT(str(?value), xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Semantic Accuracy==&lt;br /&gt;
&lt;br /&gt;
===Based on Functional Dependent Value Rule (1 Condition)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate an approximation of [[Semantic Accuracy]] of an instance regarding the value of a certain property based on the ratio of all instances of a class and instances that have property value combinations that are incorrect.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependent value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Semantic Accuracy]] per functional dependent value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?semanticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    ?i2 ?cpropURI1 ?condvalue1 .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Timeliness==&lt;br /&gt;
===Based on Expiry Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and expired instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All expiry rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per expiry rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND ((now()) AS ?today)&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Update Rules===&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''Please Note:'''&amp;lt;/span&amp;gt; This rule requires the SPARQL extension '''dqf:requiredTimestamp''' in order to work.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and instances that have not been updated in a specific period of time.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All update rules (in OWL DL Design) and the timestamps of the tested instances&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per update rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND((dqf:requiredTimestamp(?duration)) AS ?reqTimestamp) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    FILTER(?reqTimestamp&amp;gt;?timestamp)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Monitoring_Reports</id>
		<title>Data Quality Monitoring Reports</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Monitoring_Reports"/>
				<updated>2012-07-01T16:11:24Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Example 1.1: Missing Properties / Values (OWL Full Design) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data Quality Monitoring Reports are an excellent instrument to quickly identify instances with requirement violations.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
With the DQM-Vocabulary you can easily create Data Quality Monitoring reports. All you need is a SPARQL-Endpoint that supports [http://www.w3.org/TR/sparql11-query/ SPARQL 1.1] or SPARQL extensions that cover datatype conversion and conversion of strings to [[Wikipedia:URI|URIs]].&lt;br /&gt;
Before you can automatically analyze your data for requirement violations, you need to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
* [[Create Data Requirements#Define Tested Elements|Declare the elements of your ontology that shall be used in the DQM-Vocabulary]]&lt;br /&gt;
* [[Create Data Requirements]]&lt;br /&gt;
&lt;br /&gt;
==Data Quality Reports with SPARQL==&lt;br /&gt;
&lt;br /&gt;
Each type of data requirement has different problem reports, since the nature of data requirements differs. Moreover, the actual SPARQL query you can use depends on the design option you have chosen to make your ontology elements an instance of [[dqm:TestedClass]] and [[dqm:TestedProperty]] (See [[Create Data Requirements#Define Tested Elements]] for an explanation). In the following you find several SPARQL queries that make use of your data requirements to identify class instances with requirement violations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 1.1: Missing Properties / Values (OWL Full Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances of a certain class that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL Full Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with missing properties and values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    {    &lt;br /&gt;
        ?i a ?tclass .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?i ?tprop ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?i a ?tclass .&lt;br /&gt;
        ?i ?tprop &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 1: Property Completeness Rule |Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 1.2: Missing Properties / Values (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with missing properties and values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?i a ?tclassURI .&lt;br /&gt;
        NOT EXISTS{&lt;br /&gt;
           ?i ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?i a ?tclassURI .&lt;br /&gt;
        ?i ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 1: Property Completeness Rule|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: Conditional Missing Properties / Values (1 Condition, OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances in a subset of a certain class that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All conditional property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Instances with missing properties and values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i ?condvalue&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ConditionalPropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop .&lt;br /&gt;
    ?cprop dqm:hasURI ?cpropreal .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal)) AS ?cpropURI) .&lt;br /&gt;
    {&lt;br /&gt;
       ?i a ?tclassURI .&lt;br /&gt;
       ?i ?cpropURI ?value &lt;br /&gt;
       NOT EXISTS{&lt;br /&gt;
          ?i ?tpropURI ?value1 .&lt;br /&gt;
      }&lt;br /&gt;
    }UNION{ &lt;br /&gt;
       ?i a ?tclassURI .&lt;br /&gt;
       ?i ?cpropURI ?value .&lt;br /&gt;
       ?i ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
    FILTER (str(?value) = str(?condvalue)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 2: Conditional Property Completeness Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 3: Syntax Violations (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances of a certain class with property values that violate a syntax rule.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All syntax rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with property values that have syntax violations&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 3: Syntax Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 4: Conditional Syntax Violations (1 Condition, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all syntax violations of property values in a subset of a certain class.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All conditional syntax rules(in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances of the subset of the class that have syntax violations.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ConditionalSyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop .&lt;br /&gt;
    ?cprop dqm:hasURI ?cpropreal .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal)) AS ?cpropURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI ?condvalueplain .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?condvalue) = str(?condvalueplain) &amp;amp;&amp;amp; !regex(str(?value), ?regex)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 4: Conditional Syntax Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 5: Out of Range Values (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that have property values out of a specified range.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value range rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with out of range values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (STRDT(str(?value), xsd:float) &amp;gt; ?upperLimit || &lt;br /&gt;
    STRDT(str(?value), xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 5: Legal Value Range Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 6: Illegal Values (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that have illegal property values, i.e. values that are not listed in the trusted reference property.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value rules (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with values not listed in the trusted reference.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty1 ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (IRI(str(?rpropvalue)) AS ?rpropURI) .&lt;br /&gt;
    BIND (IRI(str(?rclassvalue)) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?i2 a ?rclassURI .&lt;br /&gt;
        ?i2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 6: Legal Value Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 7: Uniqueness Violations (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with property values that are not unique although they should.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All unique value rules (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with non-unique values of property that must have unique values for each instance.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?uniqueValue1 .&lt;br /&gt;
    ?i2 ?tpropURI ?uniqueValue2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; (str(?uniqueValue1) = str(?uniqueValue2)))&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?i&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 7: Unique Value Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 8: Functional Dependency Violations (1 Condition, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with inconsistent property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependency value rules with 1 condition (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with inconsistent property values.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i ?dvalue ?value&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 8: Functional Dependency Value Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 9: Functional Dependency Violations (2 Conditions, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with inconsistent property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependency value rules with 2 conditions (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with inconsistent property values.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i &lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
    ?cond2 dqm:conditionalProperty ?cprop2 .&lt;br /&gt;
    ?cprop2 dqm:hasURI ?cpropreal2 .&lt;br /&gt;
    ?cond2 dqm:equals ?condvalue2 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal2)) AS ?cpropURI2) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?cpropURI2 ?condvalue2 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 9: Functional Dependency Value Rule (2 Conditions, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: Outdated / Expired Values (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all outdated instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All expiry rules (in OWL DL Design) and validity date of instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with that are not valid anymore.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND ((now()) AS ?today)&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 10: Expiry Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 11: Outdated / Not Updated Values (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all outdated instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All update rules (in OWL DL Design) and timestamps of instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with that are potentially outdated.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND((dqf:requiredTimestamp(str(?duration))) AS ?reqTimestamp) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    FILTER(?reqTimestamp&amp;gt;?timestamp)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 11: Update Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 12: Duplicate Instance Rule (3 Properties, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find duplicate instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||Duplicate instance rules with 3 tested properties.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances that have identical values for the 3 tested properties.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
?dqr dqm:testedClass ?tclass .&lt;br /&gt;
?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
?i a ?tclassURI .&lt;br /&gt;
?i ?tpropURI1 ?value11 .&lt;br /&gt;
?i2 ?tpropURI1 ?value12 . &lt;br /&gt;
?i ?tpropURI2 ?value21 . 			&lt;br /&gt;
?i2 ?tpropURI2 ?value22 . 			&lt;br /&gt;
?i ?tpropURI3 ?value31 . 			&lt;br /&gt;
?i2 ?tpropURI3 ?value32 .&lt;br /&gt;
FILTER(?i!=?i2 &amp;amp;&amp;amp; str(?value11) = str(?value12) &amp;amp;&amp;amp; str(?value21) = str(?value22) &amp;amp;&amp;amp; str(?value31) = str(?value32))&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 13: Functional Dependency Violations (2 Reference Properties, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find functional dependency violations between two property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||Functional dependency reference rules with 2 tested properties.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances that have violating dependencies between the two tested property values.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i &lt;br /&gt;
WHERE {&lt;br /&gt;
?dqr a dqm:FuncDepReferenceRule .&lt;br /&gt;
?dqr dqm:assessment &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
?dqr dqm:testedClass ?tclass . &lt;br /&gt;
?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
 BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
 ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
  BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
 ?dqr dqm:referenceClass ?trefclass . &lt;br /&gt;
 ?trefclass dqm:hasURI ?trefclassreal .&lt;br /&gt;
 BIND (IRI(str(?trefclassreal)) AS ?trefclassURI) .&lt;br /&gt;
?dqr dqm:referenceProperty1 ?trefprop1 .&lt;br /&gt;
?trefprop1 dqm:hasURI ?trefpropreal1 .&lt;br /&gt;
 BIND (IRI(str(?trefpropreal1)) AS ?trefpropURI1) .&lt;br /&gt;
 ?dqr dqm:referenceProperty2 ?trefprop2 .&lt;br /&gt;
?trefprop2 dqm:hasURI ?trefpropreal2 .&lt;br /&gt;
BIND (IRI(str(?trefpropreal2)) AS ?trefpropURI2) .&lt;br /&gt;
?i a ?tclassURI .&lt;br /&gt;
?i ?tpropURI1 ?value1 .&lt;br /&gt;
?i ?tpropURI2 ?value2 .&lt;br /&gt;
BIND(STRDT(str(?value1),xsd:string) AS ?value11 ) &lt;br /&gt;
BIND(STRDT(str(?value2),xsd:string) AS ?value12 ) &lt;br /&gt;
NOT EXISTS{ &lt;br /&gt;
?i2 a ?trefclassURI .&lt;br /&gt;
 ?i2 ?trefpropURI1 ?value11 .&lt;br /&gt;
 ?i2 ?trefpropURI2 ?value12 .&lt;br /&gt;
 }&lt;br /&gt;
}		&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports</id>
		<title>Data Quality Assessment Reports</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports"/>
				<updated>2012-07-01T16:09:14Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Completeness (OWL DL) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data Quality Scores can be used to get a quick impression about the quality state of a data source. Below you can find queries that can calculate data quality scores based on pre-defined data requirements on the fly.&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
With the DQM-Vocabulary you can easily create Data Quality Scores. All you need is a SPARQL-Endpoint that supports SPARQL 1.1 or SPARQL extensions that cover datatype conversion and conversion of strings to URIs. Before you can automatically analyze your data for requirement violations, you need to perform the following steps:&lt;br /&gt;
* [[Create Data Requirements#Define Tested Elements|Declare the elements of your ontology that shall be used in the DQM-Vocabulary]]&lt;br /&gt;
* [[Create Data Requirements]]&lt;br /&gt;
&lt;br /&gt;
=Data Quality Score Calculations=&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL DL)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL Full)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL Full Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Depth==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of a property based on the ratio of all instances of a class and instances that have non-unique property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All unique value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness Scores per unique value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI ((COUNT(?i)/2) AS ?violations) (COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessDepth)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?uniqueValue1 .&lt;br /&gt;
    ?i2 ?tpropURI ?uniqueValue2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; (str(?uniqueValue1) = str(?uniqueValue2)))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Scope==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of class instances based on the ratio of all instances of a class and duplicate instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All duplicate instances rules (Example case: 3 tested Properties, OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness in scope scores for classes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI &lt;br /&gt;
((COUNT(?i)/2) AS ?violations)&lt;br /&gt;
(COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessScope)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI1 ?value11 .&lt;br /&gt;
    ?i2 ?tpropURI1 ?value12 . &lt;br /&gt;
    ?i ?tpropURI2 ?value21 . 			&lt;br /&gt;
    ?i2 ?tpropURI2 ?value22 . 			&lt;br /&gt;
    ?i ?tpropURI3 ?value31 . 			&lt;br /&gt;
    ?i2 ?tpropURI3 ?value32 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; str(?value11) = str(?value12) &amp;amp;&amp;amp; str(?value21) = str(?value22) &amp;amp;&amp;amp; str(?value31) = str(?value32))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntactic Accuracy==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Based on Syntax Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values with syntax rule violations.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All syntax rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per syntax rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are not listed as legal values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI &lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty1 ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?rpropvalue)) AS ?rpropURI) .&lt;br /&gt;
    BIND (IRI(str(?rclassvalue)) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?i2 a ?rclassURI .&lt;br /&gt;
        ?i2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Range Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are out of a legal range.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value range rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value range rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (STRDT(str(?value), xsd:float) &amp;gt; ?upperLimit || &lt;br /&gt;
    STRDT(str(?value), xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Semantic Accuracy==&lt;br /&gt;
&lt;br /&gt;
===Based on Functional Dependent Value Rule (1 Condition)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate an approximation of [[Semantic Accuracy]] of an instance regarding the value of a certain property based on the ratio of all instances of a class and instances that have property value combinations that are incorrect.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependent value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Semantic Accuracy]] per functional dependent value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?semanticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    ?i2 ?cpropURI1 ?condvalue1 .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Timeliness==&lt;br /&gt;
===Based on Expiry Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and expired instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All expiry rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per expiry rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND ((now()) AS ?today)&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Update Rules===&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''Please Note:'''&amp;lt;/span&amp;gt; This rule requires the SPARQL extension '''dqf:requiredTimestamp''' in order to work.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and instances that have not been updated in a specific period of time.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All update rules (in OWL DL Design) and the timestamps of the tested instances&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per update rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND((dqf:requiredTimestamp(?duration)) AS ?reqTimestamp) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    FILTER(?reqTimestamp&amp;gt;?timestamp)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks</id>
		<title>Data Requirements Consistency Checks</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks"/>
				<updated>2012-06-18T16:58:18Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Contradictory Unique Value Rules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Contradictory Unique Value Rules==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?dr1 AS ?UniqueValueRequirement) (?dr2 AS ?InconsistentRequirement)&lt;br /&gt;
WHERE{&lt;br /&gt;
?dr1 a dqm:UniqueValueRule .&lt;br /&gt;
?dr1 dqm:testedClass ?class1 .&lt;br /&gt;
?class1 dqm:hasURI ?class1URI .&lt;br /&gt;
?dr1 dqm:testedProperty1 ?prop1 .&lt;br /&gt;
?prop1 dqm:hasURI ?prop1URI .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
   ?dr2 a dqm:PropertyRequirement .&lt;br /&gt;
   ?dr2 dqm:testedClass ?class2 .&lt;br /&gt;
   ?class2 dqm:hasURI ?class2URI .&lt;br /&gt;
   ?dr2 dqm:testedProperty1 ?prop2 .&lt;br /&gt;
   ?prop2 dqm:hasURI ?prop2URI .&lt;br /&gt;
   FILTER(str(?prop1URI) = str(?prop2URI) &amp;amp;&amp;amp; str(?class1URI) = str(?class2URI) &amp;amp;&amp;amp; ?dr1 != ?dr2)&lt;br /&gt;
   MINUS{&lt;br /&gt;
      ?dr2 a dqm:UniqueValueRule&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
FILTER(bound(?prop2URI))&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Duplicate Property Requirements==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?tclassURI1 AS ?Class) (?tpropURI1 AS ?Property) (?dr1 AS ?DataRequirement)&lt;br /&gt;
WHERE {&lt;br /&gt;
   ?dr1 a dqm:PropertyRequirement .&lt;br /&gt;
   ?dr1 dqm:testedClass ?tclass1 .&lt;br /&gt;
   ?tclass1 dqm:hasURI ?tclassURI1 .   &lt;br /&gt;
   ?dr1 dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
   ?tprop1 dqm:hasURI ?tpropURI1 .&lt;br /&gt;
}&lt;br /&gt;
ORDER BY ?tclassURI1 ?tpropURI1 ?dr1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dr1 ?dr2&lt;br /&gt;
WHERE {&lt;br /&gt;
?dr1 a dqm:PropertyRequirement .&lt;br /&gt;
?dr1 dqm:testedClass ?tclass1 .&lt;br /&gt;
?tclass1 dqm:hasURI ?tclassURI1 .   &lt;br /&gt;
?dr1 dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropURI1 .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
?dr2 a dqm:PropertyRequirement .&lt;br /&gt;
?dr2 dqm:testedClass ?tclass2 .&lt;br /&gt;
?tclass2 dqm:hasURI ?tclassURI2 .   &lt;br /&gt;
?dr2 dqm:testedProperty1 ?tprop2 .&lt;br /&gt;
?tprop2 dqm:hasURI ?tpropURI2 .&lt;br /&gt;
FILTER(?dr1!=?dr2 &amp;amp;&amp;amp; str(?tclassURI1) = str(?tclassURI2) &amp;amp;&amp;amp; str(?tpropURI1) = str(?tpropURI2))&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks</id>
		<title>Data Requirements Consistency Checks</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks"/>
				<updated>2012-06-18T16:56:21Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Contradictory Unique Value Rules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Contradictory Unique Value Rules==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?s AS ?uniquevaluereq) (?s2 AS ?nonuniquenessreq)&lt;br /&gt;
WHERE{&lt;br /&gt;
?dr1 a dqm:UniqueValueRule .&lt;br /&gt;
?dr1 dqm:testedClass ?class1 .&lt;br /&gt;
?class1 dqm:hasURI ?class1URI .&lt;br /&gt;
?dr1 dqm:testedProperty1 ?prop1 .&lt;br /&gt;
?prop1 dqm:hasURI ?prop1URI .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
   ?dr2 a dqm:PropertyRequirement .&lt;br /&gt;
   ?dr2 dqm:testedClass ?class2 .&lt;br /&gt;
   ?class2 dqm:hasURI ?class2URI .&lt;br /&gt;
   ?dr2 dqm:testedProperty1 ?prop2 .&lt;br /&gt;
   ?prop2 dqm:hasURI ?prop2URI .&lt;br /&gt;
   FILTER(str(?prop1URI) = str(?prop2URI) &amp;amp;&amp;amp; str(?class1URI) = str(?class2URI) &amp;amp;&amp;amp; dr1 != dr2)&lt;br /&gt;
   MINUS{&lt;br /&gt;
      dr2 a dqm:UniqueValueRule&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
FILTER(bound(?prop2URI))&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Duplicate Property Requirements==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?tclassURI1 AS ?Class) (?tpropURI1 AS ?Property) (?dr1 AS ?DataRequirement)&lt;br /&gt;
WHERE {&lt;br /&gt;
   ?dr1 a dqm:PropertyRequirement .&lt;br /&gt;
   ?dr1 dqm:testedClass ?tclass1 .&lt;br /&gt;
   ?tclass1 dqm:hasURI ?tclassURI1 .   &lt;br /&gt;
   ?dr1 dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
   ?tprop1 dqm:hasURI ?tpropURI1 .&lt;br /&gt;
}&lt;br /&gt;
ORDER BY ?tclassURI1 ?tpropURI1 ?dr1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dr1 ?dr2&lt;br /&gt;
WHERE {&lt;br /&gt;
?dr1 a dqm:PropertyRequirement .&lt;br /&gt;
?dr1 dqm:testedClass ?tclass1 .&lt;br /&gt;
?tclass1 dqm:hasURI ?tclassURI1 .   &lt;br /&gt;
?dr1 dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropURI1 .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
?dr2 a dqm:PropertyRequirement .&lt;br /&gt;
?dr2 dqm:testedClass ?tclass2 .&lt;br /&gt;
?tclass2 dqm:hasURI ?tclassURI2 .   &lt;br /&gt;
?dr2 dqm:testedProperty1 ?tprop2 .&lt;br /&gt;
?tprop2 dqm:hasURI ?tpropURI2 .&lt;br /&gt;
FILTER(?dr1!=?dr2 &amp;amp;&amp;amp; str(?tclassURI1) = str(?tclassURI2) &amp;amp;&amp;amp; str(?tpropURI1) = str(?tpropURI2))&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks</id>
		<title>Data Requirements Consistency Checks</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks"/>
				<updated>2012-06-18T16:23:50Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Duplicate Property Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Contradictory Unique Value Rules==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?s AS ?uniquevaluereq) (?s2 AS ?nonuniquenessreq)&lt;br /&gt;
WHERE{&lt;br /&gt;
?s a dqm:UniqueValueRule .&lt;br /&gt;
?s dqm:testedClass ?class1 .&lt;br /&gt;
?class1 dqm:hasURI ?class1URI .&lt;br /&gt;
?s dqm:testedProperty1 ?prop1 .&lt;br /&gt;
?prop1 dqm:hasURI ?prop1URI .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
   ?s2 a dqm:PropertyRequirement .&lt;br /&gt;
   ?s2 dqm:testedClass ?class2 .&lt;br /&gt;
   ?class2 dqm:hasURI ?class2URI .&lt;br /&gt;
   ?s2 dqm:testedProperty1 ?prop2 .&lt;br /&gt;
   ?prop2 dqm:hasURI ?prop2URI .&lt;br /&gt;
   FILTER(str(?prop1URI) = str(?prop2URI) &amp;amp;&amp;amp; str(?class1URI) = str(?class2URI) &amp;amp;&amp;amp; ?s != ?s2)&lt;br /&gt;
   MINUS{&lt;br /&gt;
      ?s2 a dqm:UniqueValueRule&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
FILTER(bound(?prop2URI))&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Duplicate Property Requirements==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?tclassURI1 AS ?Class) (?tpropURI1 AS ?Property) (?dr1 AS ?DataRequirement)&lt;br /&gt;
WHERE {&lt;br /&gt;
   ?dr1 a dqm:PropertyRequirement .&lt;br /&gt;
   ?dr1 dqm:testedClass ?tclass1 .&lt;br /&gt;
   ?tclass1 dqm:hasURI ?tclassURI1 .   &lt;br /&gt;
   ?dr1 dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
   ?tprop1 dqm:hasURI ?tpropURI1 .&lt;br /&gt;
}&lt;br /&gt;
ORDER BY ?tclassURI1 ?tpropURI1 ?dr1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dr1 ?dr2&lt;br /&gt;
WHERE {&lt;br /&gt;
?dr1 a dqm:PropertyRequirement .&lt;br /&gt;
?dr1 dqm:testedClass ?tclass1 .&lt;br /&gt;
?tclass1 dqm:hasURI ?tclassURI1 .   &lt;br /&gt;
?dr1 dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropURI1 .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
?dr2 a dqm:PropertyRequirement .&lt;br /&gt;
?dr2 dqm:testedClass ?tclass2 .&lt;br /&gt;
?tclass2 dqm:hasURI ?tclassURI2 .   &lt;br /&gt;
?dr2 dqm:testedProperty1 ?tprop2 .&lt;br /&gt;
?tprop2 dqm:hasURI ?tpropURI2 .&lt;br /&gt;
FILTER(?dr1!=?dr2 &amp;amp;&amp;amp; str(?tclassURI1) = str(?tclassURI2) &amp;amp;&amp;amp; str(?tpropURI1) = str(?tpropURI2))&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks</id>
		<title>Data Requirements Consistency Checks</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks"/>
				<updated>2012-06-18T16:23:15Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Contradictory Unique Value Rules==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?s AS ?uniquevaluereq) (?s2 AS ?nonuniquenessreq)&lt;br /&gt;
WHERE{&lt;br /&gt;
?s a dqm:UniqueValueRule .&lt;br /&gt;
?s dqm:testedClass ?class1 .&lt;br /&gt;
?class1 dqm:hasURI ?class1URI .&lt;br /&gt;
?s dqm:testedProperty1 ?prop1 .&lt;br /&gt;
?prop1 dqm:hasURI ?prop1URI .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
   ?s2 a dqm:PropertyRequirement .&lt;br /&gt;
   ?s2 dqm:testedClass ?class2 .&lt;br /&gt;
   ?class2 dqm:hasURI ?class2URI .&lt;br /&gt;
   ?s2 dqm:testedProperty1 ?prop2 .&lt;br /&gt;
   ?prop2 dqm:hasURI ?prop2URI .&lt;br /&gt;
   FILTER(str(?prop1URI) = str(?prop2URI) &amp;amp;&amp;amp; str(?class1URI) = str(?class2URI) &amp;amp;&amp;amp; ?s != ?s2)&lt;br /&gt;
   MINUS{&lt;br /&gt;
      ?s2 a dqm:UniqueValueRule&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
FILTER(bound(?prop2URI))&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Duplicate Property Requirements==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT (?tclassURI1 AS ?Class) (?tpropURI1 AS ?Property) (?dr1 AS ?DataRequirement)&lt;br /&gt;
WHERE {&lt;br /&gt;
?dr1 a dqm:PropertyRequirement .&lt;br /&gt;
?dr1 dqm:testedClass ?tclass1 .&lt;br /&gt;
?tclass1 dqm:hasURI ?tclassURI1 .   &lt;br /&gt;
?dr1 dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropURI1 .&lt;br /&gt;
}&lt;br /&gt;
ORDER BY ?tclassURI1 ?tpropURI1 ?dr1&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dr1 ?dr2&lt;br /&gt;
WHERE {&lt;br /&gt;
?dr1 a dqm:PropertyRequirement .&lt;br /&gt;
?dr1 dqm:testedClass ?tclass1 .&lt;br /&gt;
?tclass1 dqm:hasURI ?tclassURI1 .   &lt;br /&gt;
?dr1 dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropURI1 .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
?dr2 a dqm:PropertyRequirement .&lt;br /&gt;
?dr2 dqm:testedClass ?tclass2 .&lt;br /&gt;
?tclass2 dqm:hasURI ?tclassURI2 .   &lt;br /&gt;
?dr2 dqm:testedProperty1 ?tprop2 .&lt;br /&gt;
?tprop2 dqm:hasURI ?tpropURI2 .&lt;br /&gt;
FILTER(?dr1!=?dr2 &amp;amp;&amp;amp; str(?tclassURI1) = str(?tclassURI2) &amp;amp;&amp;amp; str(?tpropURI1) = str(?tpropURI2))&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks</id>
		<title>Data Requirements Consistency Checks</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks"/>
				<updated>2012-06-18T16:10:10Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Contradictory Unique Value Rules==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?s AS ?uniquevaluereq) (?s2 AS ?nonuniquenessreq)&lt;br /&gt;
WHERE{&lt;br /&gt;
?s a dqm:UniqueValueRule .&lt;br /&gt;
?s dqm:testedClass ?class1 .&lt;br /&gt;
?class1 dqm:hasURI ?class1URI .&lt;br /&gt;
?s dqm:testedProperty1 ?prop1 .&lt;br /&gt;
?prop1 dqm:hasURI ?prop1URI .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
   ?s2 a dqm:PropertyRequirement .&lt;br /&gt;
   ?s2 dqm:testedClass ?class2 .&lt;br /&gt;
   ?class2 dqm:hasURI ?class2URI .&lt;br /&gt;
   ?s2 dqm:testedProperty1 ?prop2 .&lt;br /&gt;
   ?prop2 dqm:hasURI ?prop2URI .&lt;br /&gt;
   FILTER(str(?prop1URI) = str(?prop2URI) &amp;amp;&amp;amp; str(?class1URI) = str(?class2URI) &amp;amp;&amp;amp; ?s != ?s2)&lt;br /&gt;
   MINUS{&lt;br /&gt;
      ?s2 a dqm:UniqueValueRule&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
FILTER(bound(?prop2URI))&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Duplicate Property Requirements==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dr1 ?dr2&lt;br /&gt;
WHERE {&lt;br /&gt;
?dr1 a dqm:PropertyRequirement .&lt;br /&gt;
?dr1 dqm:testedClass ?tclass1 .&lt;br /&gt;
?tclass1 dqm:hasURI ?tclassURI1 .   &lt;br /&gt;
?dr1 dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropURI1 .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
?dr2 a dqm:PropertyRequirement .&lt;br /&gt;
?dr2 dqm:testedClass ?tclass2 .&lt;br /&gt;
?tclass2 dqm:hasURI ?tclassURI2 .   &lt;br /&gt;
?dr2 dqm:testedProperty1 ?tprop2 .&lt;br /&gt;
?tprop2 dqm:hasURI ?tpropURI2 .&lt;br /&gt;
FILTER(?dr1!=?dr2 &amp;amp;&amp;amp; str(?tclassURI1) = str(?tclassURI2) &amp;amp;&amp;amp; str(?tpropURI1) = str(?tpropURI2))&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks</id>
		<title>Data Requirements Consistency Checks</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks"/>
				<updated>2012-06-17T10:43:15Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Contradictory Unique Value Rules==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?s AS ?uniquevaluereq) (?s2 AS ?nonuniquenessreq)&lt;br /&gt;
WHERE{&lt;br /&gt;
?s a dqm:UniqueValueRule .&lt;br /&gt;
?s dqm:testedClass ?class1 .&lt;br /&gt;
?class1 dqm:hasURI ?class1URI .&lt;br /&gt;
?s dqm:testedProperty1 ?prop1 .&lt;br /&gt;
?prop1 dqm:hasURI ?prop1URI .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
   ?s2 a dqm:PropertyRequirement .&lt;br /&gt;
   ?s2 dqm:testedClass ?class2 .&lt;br /&gt;
   ?class2 dqm:hasURI ?class2URI .&lt;br /&gt;
   ?s2 dqm:testedProperty1 ?prop2 .&lt;br /&gt;
   ?prop2 dqm:hasURI ?prop2URI .&lt;br /&gt;
   FILTER(str(?prop1URI) = str(?prop2URI) &amp;amp;&amp;amp; str(?class1URI) = str(?class2URI) &amp;amp;&amp;amp; ?s != ?s2)&lt;br /&gt;
   MINUS{&lt;br /&gt;
      ?s2 a dqm:UniqueValueRule&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
FILTER(bound(?prop2URI))&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks</id>
		<title>Data Requirements Consistency Checks</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks"/>
				<updated>2012-06-17T10:34:17Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?s AS ?uniquevaluereq) (?s2 AS ?nonuniquenessreq)&lt;br /&gt;
WHERE{&lt;br /&gt;
?s a dqm:UniqueValueRule .&lt;br /&gt;
?s dqm:testedClass ?class1 .&lt;br /&gt;
?class1 dqm:hasURI ?class1URI .&lt;br /&gt;
?s dqm:testedProperty1 ?prop1 .&lt;br /&gt;
?prop1 dqm:hasURI ?prop1URI .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
   ?s2 a dqm:PropertyRequirement .&lt;br /&gt;
   ?s2 dqm:testedClass ?class2 .&lt;br /&gt;
   ?class2 dqm:hasURI ?class2URI .&lt;br /&gt;
   ?s2 dqm:testedProperty1 ?prop2 .&lt;br /&gt;
   ?prop2 dqm:hasURI ?prop2URI .&lt;br /&gt;
   FILTER(str(?prop1URI) = str(?prop2URI) &amp;amp;&amp;amp; str(?class1URI) = str(?class2URI) &amp;amp;&amp;amp; ?s != ?s2)&lt;br /&gt;
   MINUS{&lt;br /&gt;
      ?s2 a dqm:UniqueValueRule&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
FILTER(bound(?prop2URI))&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks</id>
		<title>Data Requirements Consistency Checks</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks"/>
				<updated>2012-06-17T10:33:36Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?s AS ?uniquevaluereq) (?s2 AS ?nonuniquenessreq)&lt;br /&gt;
WHERE{&lt;br /&gt;
?s a dqm:UniqueValueRule .&lt;br /&gt;
?s dqm:testedClass ?class1 .&lt;br /&gt;
?class1 dqm:hasURI ?class1URI .&lt;br /&gt;
?s dqm:testedProperty1 ?prop1 .&lt;br /&gt;
?prop1 dqm:hasURI ?prop1URI .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
?s2 a dqm:PropertyRequirement .&lt;br /&gt;
?s2 dqm:testedClass ?class2 .&lt;br /&gt;
?class2 dqm:hasURI ?class2URI .&lt;br /&gt;
?s2 dqm:testedProperty1 ?prop2 .&lt;br /&gt;
?prop2 dqm:hasURI ?prop2URI .&lt;br /&gt;
FILTER(str(?prop1URI) = str(?prop2URI) &amp;amp;&amp;amp; str(?class1URI) = str(?class2URI) &amp;amp;&amp;amp; ?s != ?s2)&lt;br /&gt;
MINUS{&lt;br /&gt;
?s2 a dqm:UniqueValueRule&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
FILTER(bound(?prop2URI))&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks</id>
		<title>Data Requirements Consistency Checks</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Requirements_Consistency_Checks"/>
				<updated>2012-06-17T10:31:47Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: Created page with &amp;quot;&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt; PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt; SELECT (?s AS ?uniquevaluereq) (?s2 AS ?nonuniquenessreq) WHERE{ ?s a dqm:UniqueValueRule . ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
SELECT (?s AS ?uniquevaluereq) (?s2 AS ?nonuniquenessreq)&lt;br /&gt;
WHERE{&lt;br /&gt;
?s a dqm:UniqueValueRule .&lt;br /&gt;
?s dqm:testedClass ?class1 .&lt;br /&gt;
?class1 dqm:hasURI ?class1URI .&lt;br /&gt;
?s dqm:testedProperty1 ?prop1 .&lt;br /&gt;
?prop1 dqm:hasURI ?prop1URI .&lt;br /&gt;
OPTIONAL{&lt;br /&gt;
?s2 a dqm:PropertyRequirement .&lt;br /&gt;
?s2 dqm:testedClass ?class2 .&lt;br /&gt;
?class2 dqm:hasURI ?class2URI .&lt;br /&gt;
?s2 dqm:testedProperty1 ?prop2 .&lt;br /&gt;
?prop2 dqm:hasURI ?prop2URI .&lt;br /&gt;
FILTER(str(?prop1URI) = str(?prop2URI) &amp;amp;&amp;amp; str(?class1URI) = str(?class2URI) &amp;amp;&amp;amp; ?s != ?s2)&lt;br /&gt;
MINUS{&lt;br /&gt;
?s2 a dqm:UniqueValueRule&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
FILTER(bound(?prop2URI))&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=SemWebQuality.org</id>
		<title>SemWebQuality.org</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=SemWebQuality.org"/>
				<updated>2012-06-04T15:45:49Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
{{DISPLAYTITLE:&amp;lt;span style=&amp;quot;display:none&amp;quot;&amp;gt;{{FULLPAGENAME}}&amp;lt;/span&amp;gt;}}&lt;br /&gt;
'''Welcome to SemWebQuality.org''' &lt;br /&gt;
This website provides information and tools about data quality in Semantic Web architectures. &lt;br /&gt;
&amp;lt;Table cellpadding=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td Width=&amp;quot;50%&amp;quot;&amp;gt;&lt;br /&gt;
{{BigHeading&lt;br /&gt;
|Title=Data Quality Constraint Library for [http://spinrdf.org SPIN]  }}&lt;br /&gt;
The data quality constraints library may be used (1) for the identification of data quality problems and (2) for quality assurance during data entry.&lt;br /&gt;
* [http://semwebquality.org/documentation/primer/ DQ-Constraints Library Primer]&amp;lt;br /&amp;gt;&lt;br /&gt;
* [http://semwebquality.org/ontologies/dq-constraints.html DQ-Constraints  Library Documentation]&amp;lt;br /&amp;gt;&lt;br /&gt;
* [http://semwebquality.org/ontologies/dq-constraints.rdf Download DQ-Constraints in RDF]&amp;lt;br /&amp;gt;&lt;br /&gt;
* [http://groups.google.com/group/dq-constraints-library DQ-Constraints Mailing List]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td Width=&amp;quot;50%&amp;quot;&amp;gt;&lt;br /&gt;
{{BigHeading&lt;br /&gt;
|Title=Data Quality Management Vocabulary }}&lt;br /&gt;
An Ontology for Data Requirements Management, Data Quality Monitoring, Data Quality Assessment, and Data Cleansing.&amp;lt;br /&amp;gt;&lt;br /&gt;
* [[DQM-Vocabulary Primer]] &lt;br /&gt;
* [http://purl.org/dqm-vocabulary/v1/dqm Latest Technical Specification of DQM-Vocabulary]&lt;br /&gt;
* [http://semwebquality.org/dqm-vocabulary/v1/dqm.owl Latest DQM-Vocabulary in OWL]&lt;br /&gt;
* [http://groups.google.com/group/dqm-vocabulary DQM-Vocabulary Mailing List] &lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
{{BigHeading&lt;br /&gt;
|Title=Information around Data Quality }}&lt;br /&gt;
* What is [[Data Quality]]?&lt;br /&gt;
* [[Data Requirements]]&lt;br /&gt;
* [[Data Quality Management]]&lt;br /&gt;
* [[Quality Perception in Information Systems]]&lt;br /&gt;
* [http://www.dqglossary.com/ Data Quality Glossary]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
{{BigHeading&lt;br /&gt;
|Title= Semantic Web Quality Links}}&lt;br /&gt;
* [http://pedantic-web.org/ Pedantic Web Group]&amp;lt;br /&amp;gt;&lt;br /&gt;
* [http://qualitywebdata.org/ Qualitywebdata.org]&amp;lt;br /&amp;gt;&lt;br /&gt;
* [http://sourceforge.net/apps/mediawiki/trdf/index.php?title=Quality_Criteria_for_Linked_Data_sources Quality Criteria for Linked Data Sources (Findings by Annika Flemming &amp;amp; Olaf Hartig)]&lt;br /&gt;
* [http://patterns.dataincubator.org/book/index.html Linked Data Patterns Book]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
{{BigHeading&lt;br /&gt;
|Title=Ontology Quality }}&lt;br /&gt;
http://ontologydesignpatterns.org/&amp;lt;br /&amp;gt;&lt;br /&gt;
http://www.ontoclean.org/&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
{{BigHeading&lt;br /&gt;
|Title=Data Quality Discussions }}&lt;br /&gt;
http://answers.semanticweb.com/questions/1072/quality-indicators-for-linked-data-datasets?sort=votes&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/Table&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Monitoring_Reports</id>
		<title>Data Quality Monitoring Reports</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Monitoring_Reports"/>
				<updated>2012-05-16T19:41:04Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Example 1.1: Missing Properties / Values (OWL Full Design) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data Quality Monitoring Reports are an excellent instrument to quickly identify instances with requirement violations.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
With the DQM-Vocabulary you can easily create Data Quality Monitoring reports. All you need is a SPARQL-Endpoint that supports [http://www.w3.org/TR/sparql11-query/ SPARQL 1.1] or SPARQL extensions that cover datatype conversion and conversion of strings to [[Wikipedia:URI|URIs]].&lt;br /&gt;
Before you can automatically analyze your data for requirement violations, you need to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
* [[Create Data Requirements#Define Tested Elements|Declare the elements of your ontology that shall be used in the DQM-Vocabulary]]&lt;br /&gt;
* [[Create Data Requirements]]&lt;br /&gt;
&lt;br /&gt;
==Data Quality Reports with SPARQL==&lt;br /&gt;
&lt;br /&gt;
Each type of data requirement has different problem reports, since the nature of data requirements differs. Moreover, the actual SPARQL query you can use depends on the design option you have chosen to make your ontology elements an instance of [[dqm:TestedClass]] and [[dqm:TestedProperty]] (See [[Create Data Requirements#Define Tested Elements]] for an explanation). In the following you find several SPARQL queries that make use of your data requirements to identify class instances with requirement violations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 1.1: Missing Properties / Values (OWL Full Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances of a certain class that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL Full Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with missing properties and values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    {    &lt;br /&gt;
        ?i a ?tclass .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?i ?tprop ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?i a ?tclass .&lt;br /&gt;
        ?i ?tprop &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 1: Property Completeness Rule |Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 1.2: Missing Properties / Values (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with missing properties and values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?i a ?tclassURI .&lt;br /&gt;
        NOT EXISTS{&lt;br /&gt;
           ?i ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?i a ?tclassURI .&lt;br /&gt;
        ?i ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 1: Property Completeness Rule|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: Conditional Missing Properties / Values (1 Condition, OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances in a subset of a certain class that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All conditional property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Instances with missing properties and values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i ?condvalue&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ConditionalPropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop .&lt;br /&gt;
    ?cprop dqm:hasURI ?cpropreal .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal)) AS ?cpropURI) .&lt;br /&gt;
    {&lt;br /&gt;
       ?i a ?tclassURI .&lt;br /&gt;
       ?i ?cpropURI ?value &lt;br /&gt;
       NOT EXISTS{&lt;br /&gt;
          ?i ?tpropURI ?value1 .&lt;br /&gt;
      }&lt;br /&gt;
    }UNION{ &lt;br /&gt;
       ?i a ?tclassURI .&lt;br /&gt;
       ?i ?cpropURI ?value .&lt;br /&gt;
       ?i ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
    FILTER (str(?value) = str(?condvalue)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 2: Conditional Property Completeness Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 3: Syntax Violations (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances of a certain class with property values that violate a syntax rule.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All syntax rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with property values that have syntax violations&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 3: Syntax Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 4: Conditional Syntax Violations (1 Condition, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all syntax violations of property values in a subset of a certain class.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All conditional syntax rules(in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances of the subset of the class that have syntax violations.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ConditionalSyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop .&lt;br /&gt;
    ?cprop dqm:hasURI ?cpropreal .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal)) AS ?cpropURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI ?condvalueplain .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?condvalue) = str(?condvalueplain) &amp;amp;&amp;amp; !regex(str(?value), ?regex)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 4: Conditional Syntax Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 5: Out of Range Values (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that have property values out of a specified range.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value range rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with out of range values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (STRDT(str(?value), xsd:float) &amp;gt; ?upperLimit || &lt;br /&gt;
    STRDT(str(?value), xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 5: Legal Value Range Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 6: Illegal Values (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that have illegal property values, i.e. values that are not listed in the trusted reference property.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value rules (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with values not listed in the trusted reference.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty1 ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (IRI(str(?rpropvalue)) AS ?rpropURI) .&lt;br /&gt;
    BIND (IRI(str(?rclassvalue)) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?i2 a ?rclassURI .&lt;br /&gt;
        ?i2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 6: Legal Value Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 7: Uniqueness Violations (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with property values that are not unique although they should.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All unique value rules (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with non-unique values of property that must have unique values for each instance.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?uniqueValue1 .&lt;br /&gt;
    ?i2 ?tpropURI ?uniqueValue2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; (str(?uniqueValue1) = str(?uniqueValue2)))&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?i&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 7: Unique Value Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 8: Functional Dependency Violations (1 Condition, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with inconsistent property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependency value rules with 1 condition (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with inconsistent property values.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i ?dvalue ?value&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 8: Functional Dependency Value Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 9: Functional Dependency Violations (2 Conditions, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with inconsistent property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependency value rules with 2 conditions (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with inconsistent property values.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i &lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
    ?cond2 dqm:conditionalProperty ?cprop2 .&lt;br /&gt;
    ?cprop2 dqm:hasURI ?cpropreal2 .&lt;br /&gt;
    ?cond2 dqm:equals ?condvalue2 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal2)) AS ?cpropURI2) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?cpropURI2 ?condvalue2 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 9: Functional Dependency Value Rule (2 Conditions, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: Outdated / Expired Values (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all outdated instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All expiry rules (in OWL DL Design) and validity date of instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with that are not valid anymore.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND ((now()) AS ?today)&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 10: Expiry Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 11: Outdated / Not Updated Values (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all outdated instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All update rules (in OWL DL Design) and timestamps of instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with that are potentially outdated.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND((dqf:requiredTimestamp(str(?duration))) AS ?reqTimestamp) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    FILTER(?reqTimestamp&amp;gt;?timestamp)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 11: Update Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 12: Duplicate Instance Rule (3 Properties, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find duplicate instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||Duplicate instance rules with 3 tested properties.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances that have identical values for the 3 tested properties.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
?dqr dqm:testedClass ?tclass .&lt;br /&gt;
?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
?i a ?tclassURI .&lt;br /&gt;
?i ?tpropURI1 ?value11 .&lt;br /&gt;
?i2 ?tpropURI1 ?value12 . &lt;br /&gt;
?i ?tpropURI2 ?value21 . 			&lt;br /&gt;
?i2 ?tpropURI2 ?value22 . 			&lt;br /&gt;
?i ?tpropURI3 ?value31 . 			&lt;br /&gt;
?i2 ?tpropURI3 ?value32 .&lt;br /&gt;
FILTER(?i!=?i2 &amp;amp;&amp;amp; str(?value11) = str(?value12) &amp;amp;&amp;amp; str(?value21) = str(?value22) &amp;amp;&amp;amp; str(?value31) = str(?value32))&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 13: Functional Dependency Violations (2 Reference Properties, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find functional dependency violations between two property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||Functional dependency reference rules with 2 tested properties.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances that have violating dependencies between the two tested property values.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i &lt;br /&gt;
WHERE {&lt;br /&gt;
?dqr a dqm:FuncDepReferenceRule .&lt;br /&gt;
?dqr dqm:assessment &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
?dqr dqm:testedClass ?tclass . &lt;br /&gt;
?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
 BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
 ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
  BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
 ?dqr dqm:referenceClass ?trefclass . &lt;br /&gt;
 ?trefclass dqm:hasURI ?trefclassreal .&lt;br /&gt;
 BIND (IRI(str(?trefclassreal)) AS ?trefclassURI) .&lt;br /&gt;
?dqr dqm:referenceProperty1 ?trefprop1 .&lt;br /&gt;
?trefprop1 dqm:hasURI ?trefpropreal1 .&lt;br /&gt;
 BIND (IRI(str(?trefpropreal1)) AS ?trefpropURI1) .&lt;br /&gt;
 ?dqr dqm:referenceProperty2 ?trefprop2 .&lt;br /&gt;
?trefprop2 dqm:hasURI ?trefpropreal2 .&lt;br /&gt;
BIND (IRI(str(?trefpropreal2)) AS ?trefpropURI2) .&lt;br /&gt;
?i a ?tclassURI .&lt;br /&gt;
?i ?tpropURI1 ?value1 .&lt;br /&gt;
?i ?tpropURI2 ?value2 .&lt;br /&gt;
BIND(STRDT(str(?value1),xsd:string) AS ?value11 ) &lt;br /&gt;
BIND(STRDT(str(?value2),xsd:string) AS ?value12 ) &lt;br /&gt;
NOT EXISTS{ &lt;br /&gt;
?i2 a ?trefclassURI .&lt;br /&gt;
 ?i2 ?trefpropURI1 ?value11 .&lt;br /&gt;
 ?i2 ?trefpropURI2 ?value12 .&lt;br /&gt;
 }&lt;br /&gt;
}		&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports</id>
		<title>Data Quality Assessment Reports</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports"/>
				<updated>2012-05-16T19:39:33Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Completeness (OWL DL) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data Quality Scores can be used to get a quick impression about the quality state of a data source. Below you can find queries that can calculate data quality scores based on pre-defined data requirements on the fly.&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
With the DQM-Vocabulary you can easily create Data Quality Scores. All you need is a SPARQL-Endpoint that supports SPARQL 1.1 or SPARQL extensions that cover datatype conversion and conversion of strings to URIs. Before you can automatically analyze your data for requirement violations, you need to perform the following steps:&lt;br /&gt;
* [[Create Data Requirements#Define Tested Elements|Declare the elements of your ontology that shall be used in the DQM-Vocabulary]]&lt;br /&gt;
* [[Create Data Requirements]]&lt;br /&gt;
&lt;br /&gt;
=Data Quality Score Calculations=&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL DL)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL Full)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL Full Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Depth==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of a property based on the ratio of all instances of a class and instances that have non-unique property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All unique value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness Scores per unique value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI ((COUNT(?i)/2) AS ?violations) (COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessDepth)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?uniqueValue1 .&lt;br /&gt;
    ?i2 ?tpropURI ?uniqueValue2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; (str(?uniqueValue1) = str(?uniqueValue2)))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Scope==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of class instances based on the ratio of all instances of a class and duplicate instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All duplicate instances rules (Example case: 3 tested Properties, OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness in scope scores for classes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI &lt;br /&gt;
((COUNT(?i)/2) AS ?violations)&lt;br /&gt;
(COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessScope)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI1 ?value11 .&lt;br /&gt;
    ?i2 ?tpropURI1 ?value12 . &lt;br /&gt;
    ?i ?tpropURI2 ?value21 . 			&lt;br /&gt;
    ?i2 ?tpropURI2 ?value22 . 			&lt;br /&gt;
    ?i ?tpropURI3 ?value31 . 			&lt;br /&gt;
    ?i2 ?tpropURI3 ?value32 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; str(?value11) = str(?value12) &amp;amp;&amp;amp; str(?value21) = str(?value22) &amp;amp;&amp;amp; str(?value31) = str(?value32))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntactic Accuracy==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Based on Syntax Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values with syntax rule violations.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All syntax rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per syntax rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are not listed as legal values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI &lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty1 ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?rpropvalue)) AS ?rpropURI) .&lt;br /&gt;
    BIND (IRI(str(?rclassvalue)) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?i2 a ?rclassURI .&lt;br /&gt;
        ?i2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Range Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are out of a legal range.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value range rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value range rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (STRDT(str(?value), xsd:float) &amp;gt; ?upperLimit || &lt;br /&gt;
    STRDT(str(?value), xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Semantic Accuracy==&lt;br /&gt;
&lt;br /&gt;
===Based on Functional Dependent Value Rule (1 Condition)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate an approximation of [[Semantic Accuracy]] of an instance regarding the value of a certain property based on the ratio of all instances of a class and instances that have property value combinations that are incorrect.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependent value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Semantic Accuracy]] per functional dependent value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?semanticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    ?i2 ?cpropURI1 ?condvalue1 .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Timeliness==&lt;br /&gt;
===Based on Expiry Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and expired instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All expiry rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per expiry rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND ((now()) AS ?today)&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Update Rules===&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''Please Note:'''&amp;lt;/span&amp;gt; This rule requires the SPARQL extension '''dqf:requiredTimestamp''' in order to work.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and instances that have not been updated in a specific period of time.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All update rules (in OWL DL Design) and the timestamps of the tested instances&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per update rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND((dqf:requiredTimestamp(?duration)) AS ?reqTimestamp) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    FILTER(?reqTimestamp&amp;gt;?timestamp)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports</id>
		<title>Data Quality Assessment Reports</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports"/>
				<updated>2012-05-16T19:39:15Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Completeness (OWL Full) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data Quality Scores can be used to get a quick impression about the quality state of a data source. Below you can find queries that can calculate data quality scores based on pre-defined data requirements on the fly.&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
With the DQM-Vocabulary you can easily create Data Quality Scores. All you need is a SPARQL-Endpoint that supports SPARQL 1.1 or SPARQL extensions that cover datatype conversion and conversion of strings to URIs. Before you can automatically analyze your data for requirement violations, you need to perform the following steps:&lt;br /&gt;
* [[Create Data Requirements#Define Tested Elements|Declare the elements of your ontology that shall be used in the DQM-Vocabulary]]&lt;br /&gt;
* [[Create Data Requirements]]&lt;br /&gt;
&lt;br /&gt;
=Data Quality Score Calculations=&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL DL)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL Full)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL Full Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Depth==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of a property based on the ratio of all instances of a class and instances that have non-unique property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All unique value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness Scores per unique value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI ((COUNT(?i)/2) AS ?violations) (COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessDepth)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?uniqueValue1 .&lt;br /&gt;
    ?i2 ?tpropURI ?uniqueValue2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; (str(?uniqueValue1) = str(?uniqueValue2)))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Scope==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of class instances based on the ratio of all instances of a class and duplicate instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All duplicate instances rules (Example case: 3 tested Properties, OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness in scope scores for classes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI &lt;br /&gt;
((COUNT(?i)/2) AS ?violations)&lt;br /&gt;
(COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessScope)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI1 ?value11 .&lt;br /&gt;
    ?i2 ?tpropURI1 ?value12 . &lt;br /&gt;
    ?i ?tpropURI2 ?value21 . 			&lt;br /&gt;
    ?i2 ?tpropURI2 ?value22 . 			&lt;br /&gt;
    ?i ?tpropURI3 ?value31 . 			&lt;br /&gt;
    ?i2 ?tpropURI3 ?value32 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; str(?value11) = str(?value12) &amp;amp;&amp;amp; str(?value21) = str(?value22) &amp;amp;&amp;amp; str(?value31) = str(?value32))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntactic Accuracy==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Based on Syntax Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values with syntax rule violations.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All syntax rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per syntax rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are not listed as legal values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI &lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty1 ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?rpropvalue)) AS ?rpropURI) .&lt;br /&gt;
    BIND (IRI(str(?rclassvalue)) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?i2 a ?rclassURI .&lt;br /&gt;
        ?i2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Range Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are out of a legal range.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value range rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value range rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (STRDT(str(?value), xsd:float) &amp;gt; ?upperLimit || &lt;br /&gt;
    STRDT(str(?value), xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Semantic Accuracy==&lt;br /&gt;
&lt;br /&gt;
===Based on Functional Dependent Value Rule (1 Condition)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate an approximation of [[Semantic Accuracy]] of an instance regarding the value of a certain property based on the ratio of all instances of a class and instances that have property value combinations that are incorrect.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependent value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Semantic Accuracy]] per functional dependent value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?semanticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    ?i2 ?cpropURI1 ?condvalue1 .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Timeliness==&lt;br /&gt;
===Based on Expiry Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and expired instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All expiry rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per expiry rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND ((now()) AS ?today)&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Update Rules===&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''Please Note:'''&amp;lt;/span&amp;gt; This rule requires the SPARQL extension '''dqf:requiredTimestamp''' in order to work.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and instances that have not been updated in a specific period of time.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All update rules (in OWL DL Design) and the timestamps of the tested instances&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per update rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND((dqf:requiredTimestamp(?duration)) AS ?reqTimestamp) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    FILTER(?reqTimestamp&amp;gt;?timestamp)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports</id>
		<title>Data Quality Assessment Reports</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports"/>
				<updated>2012-05-16T19:37:52Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Completeness (OWL Full) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data Quality Scores can be used to get a quick impression about the quality state of a data source. Below you can find queries that can calculate data quality scores based on pre-defined data requirements on the fly.&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
With the DQM-Vocabulary you can easily create Data Quality Scores. All you need is a SPARQL-Endpoint that supports SPARQL 1.1 or SPARQL extensions that cover datatype conversion and conversion of strings to URIs. Before you can automatically analyze your data for requirement violations, you need to perform the following steps:&lt;br /&gt;
* [[Create Data Requirements#Define Tested Elements|Declare the elements of your ontology that shall be used in the DQM-Vocabulary]]&lt;br /&gt;
* [[Create Data Requirements]]&lt;br /&gt;
&lt;br /&gt;
=Data Quality Score Calculations=&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL DL)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL Full)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL Full Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Depth==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of a property based on the ratio of all instances of a class and instances that have non-unique property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All unique value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness Scores per unique value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI ((COUNT(?i)/2) AS ?violations) (COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessDepth)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?uniqueValue1 .&lt;br /&gt;
    ?i2 ?tpropURI ?uniqueValue2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; (str(?uniqueValue1) = str(?uniqueValue2)))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Scope==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of class instances based on the ratio of all instances of a class and duplicate instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All duplicate instances rules (Example case: 3 tested Properties, OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness in scope scores for classes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI &lt;br /&gt;
((COUNT(?i)/2) AS ?violations)&lt;br /&gt;
(COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessScope)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI1 ?value11 .&lt;br /&gt;
    ?i2 ?tpropURI1 ?value12 . &lt;br /&gt;
    ?i ?tpropURI2 ?value21 . 			&lt;br /&gt;
    ?i2 ?tpropURI2 ?value22 . 			&lt;br /&gt;
    ?i ?tpropURI3 ?value31 . 			&lt;br /&gt;
    ?i2 ?tpropURI3 ?value32 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; str(?value11) = str(?value12) &amp;amp;&amp;amp; str(?value21) = str(?value22) &amp;amp;&amp;amp; str(?value31) = str(?value32))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntactic Accuracy==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Based on Syntax Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values with syntax rule violations.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All syntax rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per syntax rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are not listed as legal values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI &lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty1 ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?rpropvalue)) AS ?rpropURI) .&lt;br /&gt;
    BIND (IRI(str(?rclassvalue)) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?i2 a ?rclassURI .&lt;br /&gt;
        ?i2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Range Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are out of a legal range.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value range rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value range rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (STRDT(str(?value), xsd:float) &amp;gt; ?upperLimit || &lt;br /&gt;
    STRDT(str(?value), xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Semantic Accuracy==&lt;br /&gt;
&lt;br /&gt;
===Based on Functional Dependent Value Rule (1 Condition)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate an approximation of [[Semantic Accuracy]] of an instance regarding the value of a certain property based on the ratio of all instances of a class and instances that have property value combinations that are incorrect.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependent value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Semantic Accuracy]] per functional dependent value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?semanticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    ?i2 ?cpropURI1 ?condvalue1 .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Timeliness==&lt;br /&gt;
===Based on Expiry Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and expired instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All expiry rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per expiry rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND ((now()) AS ?today)&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Update Rules===&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''Please Note:'''&amp;lt;/span&amp;gt; This rule requires the SPARQL extension '''dqf:requiredTimestamp''' in order to work.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and instances that have not been updated in a specific period of time.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All update rules (in OWL DL Design) and the timestamps of the tested instances&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per update rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND((dqf:requiredTimestamp(?duration)) AS ?reqTimestamp) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    FILTER(?reqTimestamp&amp;gt;?timestamp)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports</id>
		<title>Data Quality Assessment Reports</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports"/>
				<updated>2012-05-16T19:37:37Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Completeness (OWL DL) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data Quality Scores can be used to get a quick impression about the quality state of a data source. Below you can find queries that can calculate data quality scores based on pre-defined data requirements on the fly.&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
With the DQM-Vocabulary you can easily create Data Quality Scores. All you need is a SPARQL-Endpoint that supports SPARQL 1.1 or SPARQL extensions that cover datatype conversion and conversion of strings to URIs. Before you can automatically analyze your data for requirement violations, you need to perform the following steps:&lt;br /&gt;
* [[Create Data Requirements#Define Tested Elements|Declare the elements of your ontology that shall be used in the DQM-Vocabulary]]&lt;br /&gt;
* [[Create Data Requirements]]&lt;br /&gt;
&lt;br /&gt;
=Data Quality Score Calculations=&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL DL)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL Full)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL Full Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
            } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Depth==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of a property based on the ratio of all instances of a class and instances that have non-unique property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All unique value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness Scores per unique value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI ((COUNT(?i)/2) AS ?violations) (COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessDepth)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?uniqueValue1 .&lt;br /&gt;
    ?i2 ?tpropURI ?uniqueValue2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; (str(?uniqueValue1) = str(?uniqueValue2)))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Scope==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of class instances based on the ratio of all instances of a class and duplicate instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All duplicate instances rules (Example case: 3 tested Properties, OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness in scope scores for classes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI &lt;br /&gt;
((COUNT(?i)/2) AS ?violations)&lt;br /&gt;
(COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessScope)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI1 ?value11 .&lt;br /&gt;
    ?i2 ?tpropURI1 ?value12 . &lt;br /&gt;
    ?i ?tpropURI2 ?value21 . 			&lt;br /&gt;
    ?i2 ?tpropURI2 ?value22 . 			&lt;br /&gt;
    ?i ?tpropURI3 ?value31 . 			&lt;br /&gt;
    ?i2 ?tpropURI3 ?value32 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; str(?value11) = str(?value12) &amp;amp;&amp;amp; str(?value21) = str(?value22) &amp;amp;&amp;amp; str(?value31) = str(?value32))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntactic Accuracy==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Based on Syntax Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values with syntax rule violations.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All syntax rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per syntax rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are not listed as legal values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI &lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty1 ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?rpropvalue)) AS ?rpropURI) .&lt;br /&gt;
    BIND (IRI(str(?rclassvalue)) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?i2 a ?rclassURI .&lt;br /&gt;
        ?i2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Range Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are out of a legal range.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value range rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value range rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (STRDT(str(?value), xsd:float) &amp;gt; ?upperLimit || &lt;br /&gt;
    STRDT(str(?value), xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Semantic Accuracy==&lt;br /&gt;
&lt;br /&gt;
===Based on Functional Dependent Value Rule (1 Condition)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate an approximation of [[Semantic Accuracy]] of an instance regarding the value of a certain property based on the ratio of all instances of a class and instances that have property value combinations that are incorrect.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependent value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Semantic Accuracy]] per functional dependent value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?semanticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    ?i2 ?cpropURI1 ?condvalue1 .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Timeliness==&lt;br /&gt;
===Based on Expiry Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and expired instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All expiry rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per expiry rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND ((now()) AS ?today)&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Update Rules===&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''Please Note:'''&amp;lt;/span&amp;gt; This rule requires the SPARQL extension '''dqf:requiredTimestamp''' in order to work.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and instances that have not been updated in a specific period of time.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All update rules (in OWL DL Design) and the timestamps of the tested instances&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per update rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND((dqf:requiredTimestamp(?duration)) AS ?reqTimestamp) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    FILTER(?reqTimestamp&amp;gt;?timestamp)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports</id>
		<title>Data Quality Assessment Reports</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports"/>
				<updated>2012-05-16T19:37:10Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Completeness (OWL Full) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data Quality Scores can be used to get a quick impression about the quality state of a data source. Below you can find queries that can calculate data quality scores based on pre-defined data requirements on the fly.&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
With the DQM-Vocabulary you can easily create Data Quality Scores. All you need is a SPARQL-Endpoint that supports SPARQL 1.1 or SPARQL extensions that cover datatype conversion and conversion of strings to URIs. Before you can automatically analyze your data for requirement violations, you need to perform the following steps:&lt;br /&gt;
* [[Create Data Requirements#Define Tested Elements|Declare the elements of your ontology that shall be used in the DQM-Vocabulary]]&lt;br /&gt;
* [[Create Data Requirements]]&lt;br /&gt;
&lt;br /&gt;
=Data Quality Score Calculations=&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL DL)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
            } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL Full)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL Full Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
            } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Depth==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of a property based on the ratio of all instances of a class and instances that have non-unique property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All unique value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness Scores per unique value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI ((COUNT(?i)/2) AS ?violations) (COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessDepth)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?uniqueValue1 .&lt;br /&gt;
    ?i2 ?tpropURI ?uniqueValue2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; (str(?uniqueValue1) = str(?uniqueValue2)))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Scope==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of class instances based on the ratio of all instances of a class and duplicate instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All duplicate instances rules (Example case: 3 tested Properties, OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness in scope scores for classes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI &lt;br /&gt;
((COUNT(?i)/2) AS ?violations)&lt;br /&gt;
(COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessScope)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI1 ?value11 .&lt;br /&gt;
    ?i2 ?tpropURI1 ?value12 . &lt;br /&gt;
    ?i ?tpropURI2 ?value21 . 			&lt;br /&gt;
    ?i2 ?tpropURI2 ?value22 . 			&lt;br /&gt;
    ?i ?tpropURI3 ?value31 . 			&lt;br /&gt;
    ?i2 ?tpropURI3 ?value32 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; str(?value11) = str(?value12) &amp;amp;&amp;amp; str(?value21) = str(?value22) &amp;amp;&amp;amp; str(?value31) = str(?value32))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntactic Accuracy==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Based on Syntax Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values with syntax rule violations.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All syntax rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per syntax rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are not listed as legal values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI &lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty1 ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?rpropvalue)) AS ?rpropURI) .&lt;br /&gt;
    BIND (IRI(str(?rclassvalue)) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?i2 a ?rclassURI .&lt;br /&gt;
        ?i2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Range Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are out of a legal range.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value range rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value range rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (STRDT(str(?value), xsd:float) &amp;gt; ?upperLimit || &lt;br /&gt;
    STRDT(str(?value), xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Semantic Accuracy==&lt;br /&gt;
&lt;br /&gt;
===Based on Functional Dependent Value Rule (1 Condition)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate an approximation of [[Semantic Accuracy]] of an instance regarding the value of a certain property based on the ratio of all instances of a class and instances that have property value combinations that are incorrect.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependent value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Semantic Accuracy]] per functional dependent value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?semanticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    ?i2 ?cpropURI1 ?condvalue1 .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Timeliness==&lt;br /&gt;
===Based on Expiry Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and expired instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All expiry rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per expiry rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND ((now()) AS ?today)&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Update Rules===&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''Please Note:'''&amp;lt;/span&amp;gt; This rule requires the SPARQL extension '''dqf:requiredTimestamp''' in order to work.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and instances that have not been updated in a specific period of time.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All update rules (in OWL DL Design) and the timestamps of the tested instances&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per update rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND((dqf:requiredTimestamp(?duration)) AS ?reqTimestamp) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    FILTER(?reqTimestamp&amp;gt;?timestamp)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports</id>
		<title>Data Quality Assessment Reports</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports"/>
				<updated>2012-05-16T19:36:48Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Completeness (OWL DL) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data Quality Scores can be used to get a quick impression about the quality state of a data source. Below you can find queries that can calculate data quality scores based on pre-defined data requirements on the fly.&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
With the DQM-Vocabulary you can easily create Data Quality Scores. All you need is a SPARQL-Endpoint that supports SPARQL 1.1 or SPARQL extensions that cover datatype conversion and conversion of strings to URIs. Before you can automatically analyze your data for requirement violations, you need to perform the following steps:&lt;br /&gt;
* [[Create Data Requirements#Define Tested Elements|Declare the elements of your ontology that shall be used in the DQM-Vocabulary]]&lt;br /&gt;
* [[Create Data Requirements]]&lt;br /&gt;
&lt;br /&gt;
=Data Quality Score Calculations=&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL DL)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
            } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL Full)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL Full Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
            } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Depth==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of a property based on the ratio of all instances of a class and instances that have non-unique property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All unique value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness Scores per unique value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI ((COUNT(?i)/2) AS ?violations) (COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessDepth)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?uniqueValue1 .&lt;br /&gt;
    ?i2 ?tpropURI ?uniqueValue2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; (str(?uniqueValue1) = str(?uniqueValue2)))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Scope==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of class instances based on the ratio of all instances of a class and duplicate instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All duplicate instances rules (Example case: 3 tested Properties, OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness in scope scores for classes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI &lt;br /&gt;
((COUNT(?i)/2) AS ?violations)&lt;br /&gt;
(COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessScope)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI1 ?value11 .&lt;br /&gt;
    ?i2 ?tpropURI1 ?value12 . &lt;br /&gt;
    ?i ?tpropURI2 ?value21 . 			&lt;br /&gt;
    ?i2 ?tpropURI2 ?value22 . 			&lt;br /&gt;
    ?i ?tpropURI3 ?value31 . 			&lt;br /&gt;
    ?i2 ?tpropURI3 ?value32 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; str(?value11) = str(?value12) &amp;amp;&amp;amp; str(?value21) = str(?value22) &amp;amp;&amp;amp; str(?value31) = str(?value32))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntactic Accuracy==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Based on Syntax Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values with syntax rule violations.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All syntax rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per syntax rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are not listed as legal values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI &lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty1 ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?rpropvalue)) AS ?rpropURI) .&lt;br /&gt;
    BIND (IRI(str(?rclassvalue)) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?i2 a ?rclassURI .&lt;br /&gt;
        ?i2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Range Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are out of a legal range.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value range rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value range rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (STRDT(str(?value), xsd:float) &amp;gt; ?upperLimit || &lt;br /&gt;
    STRDT(str(?value), xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Semantic Accuracy==&lt;br /&gt;
&lt;br /&gt;
===Based on Functional Dependent Value Rule (1 Condition)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate an approximation of [[Semantic Accuracy]] of an instance regarding the value of a certain property based on the ratio of all instances of a class and instances that have property value combinations that are incorrect.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependent value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Semantic Accuracy]] per functional dependent value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?semanticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    ?i2 ?cpropURI1 ?condvalue1 .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Timeliness==&lt;br /&gt;
===Based on Expiry Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and expired instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All expiry rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per expiry rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND ((now()) AS ?today)&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Update Rules===&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''Please Note:'''&amp;lt;/span&amp;gt; This rule requires the SPARQL extension '''dqf:requiredTimestamp''' in order to work.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and instances that have not been updated in a specific period of time.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All update rules (in OWL DL Design) and the timestamps of the tested instances&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per update rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND((dqf:requiredTimestamp(?duration)) AS ?reqTimestamp) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    FILTER(?reqTimestamp&amp;gt;?timestamp)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports</id>
		<title>Data Quality Assessment Reports</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports"/>
				<updated>2012-05-16T19:36:11Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Completeness (OWL Full) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data Quality Scores can be used to get a quick impression about the quality state of a data source. Below you can find queries that can calculate data quality scores based on pre-defined data requirements on the fly.&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
With the DQM-Vocabulary you can easily create Data Quality Scores. All you need is a SPARQL-Endpoint that supports SPARQL 1.1 or SPARQL extensions that cover datatype conversion and conversion of strings to URIs. Before you can automatically analyze your data for requirement violations, you need to perform the following steps:&lt;br /&gt;
* [[Create Data Requirements#Define Tested Elements|Declare the elements of your ontology that shall be used in the DQM-Vocabulary]]&lt;br /&gt;
* [[Create Data Requirements]]&lt;br /&gt;
&lt;br /&gt;
=Data Quality Score Calculations=&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL DL)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
            } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL Full)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL Full Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
            } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Depth==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of a property based on the ratio of all instances of a class and instances that have non-unique property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All unique value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness Scores per unique value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI ((COUNT(?i)/2) AS ?violations) (COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessDepth)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?uniqueValue1 .&lt;br /&gt;
    ?i2 ?tpropURI ?uniqueValue2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; (str(?uniqueValue1) = str(?uniqueValue2)))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Scope==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of class instances based on the ratio of all instances of a class and duplicate instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All duplicate instances rules (Example case: 3 tested Properties, OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness in scope scores for classes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI &lt;br /&gt;
((COUNT(?i)/2) AS ?violations)&lt;br /&gt;
(COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessScope)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI1 ?value11 .&lt;br /&gt;
    ?i2 ?tpropURI1 ?value12 . &lt;br /&gt;
    ?i ?tpropURI2 ?value21 . 			&lt;br /&gt;
    ?i2 ?tpropURI2 ?value22 . 			&lt;br /&gt;
    ?i ?tpropURI3 ?value31 . 			&lt;br /&gt;
    ?i2 ?tpropURI3 ?value32 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; str(?value11) = str(?value12) &amp;amp;&amp;amp; str(?value21) = str(?value22) &amp;amp;&amp;amp; str(?value31) = str(?value32))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntactic Accuracy==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Based on Syntax Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values with syntax rule violations.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All syntax rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per syntax rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are not listed as legal values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI &lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty1 ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?rpropvalue)) AS ?rpropURI) .&lt;br /&gt;
    BIND (IRI(str(?rclassvalue)) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?i2 a ?rclassURI .&lt;br /&gt;
        ?i2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Range Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are out of a legal range.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value range rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value range rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (STRDT(str(?value), xsd:float) &amp;gt; ?upperLimit || &lt;br /&gt;
    STRDT(str(?value), xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Semantic Accuracy==&lt;br /&gt;
&lt;br /&gt;
===Based on Functional Dependent Value Rule (1 Condition)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate an approximation of [[Semantic Accuracy]] of an instance regarding the value of a certain property based on the ratio of all instances of a class and instances that have property value combinations that are incorrect.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependent value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Semantic Accuracy]] per functional dependent value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?semanticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    ?i2 ?cpropURI1 ?condvalue1 .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Timeliness==&lt;br /&gt;
===Based on Expiry Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and expired instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All expiry rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per expiry rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND ((now()) AS ?today)&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Update Rules===&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''Please Note:'''&amp;lt;/span&amp;gt; This rule requires the SPARQL extension '''dqf:requiredTimestamp''' in order to work.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and instances that have not been updated in a specific period of time.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All update rules (in OWL DL Design) and the timestamps of the tested instances&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per update rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND((dqf:requiredTimestamp(?duration)) AS ?reqTimestamp) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    FILTER(?reqTimestamp&amp;gt;?timestamp)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports</id>
		<title>Data Quality Assessment Reports</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports"/>
				<updated>2012-05-16T19:35:48Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Completeness (OWL DL) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data Quality Scores can be used to get a quick impression about the quality state of a data source. Below you can find queries that can calculate data quality scores based on pre-defined data requirements on the fly.&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
With the DQM-Vocabulary you can easily create Data Quality Scores. All you need is a SPARQL-Endpoint that supports SPARQL 1.1 or SPARQL extensions that cover datatype conversion and conversion of strings to URIs. Before you can automatically analyze your data for requirement violations, you need to perform the following steps:&lt;br /&gt;
* [[Create Data Requirements#Define Tested Elements|Declare the elements of your ontology that shall be used in the DQM-Vocabulary]]&lt;br /&gt;
* [[Create Data Requirements]]&lt;br /&gt;
&lt;br /&gt;
=Data Quality Score Calculations=&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL DL)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
            } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL Full)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL Full Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
            } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Depth==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of a property based on the ratio of all instances of a class and instances that have non-unique property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All unique value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness Scores per unique value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI ((COUNT(?i)/2) AS ?violations) (COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessDepth)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?uniqueValue1 .&lt;br /&gt;
    ?i2 ?tpropURI ?uniqueValue2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; (str(?uniqueValue1) = str(?uniqueValue2)))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Scope==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of class instances based on the ratio of all instances of a class and duplicate instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All duplicate instances rules (Example case: 3 tested Properties, OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness in scope scores for classes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI &lt;br /&gt;
((COUNT(?i)/2) AS ?violations)&lt;br /&gt;
(COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessScope)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI1 ?value11 .&lt;br /&gt;
    ?i2 ?tpropURI1 ?value12 . &lt;br /&gt;
    ?i ?tpropURI2 ?value21 . 			&lt;br /&gt;
    ?i2 ?tpropURI2 ?value22 . 			&lt;br /&gt;
    ?i ?tpropURI3 ?value31 . 			&lt;br /&gt;
    ?i2 ?tpropURI3 ?value32 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; str(?value11) = str(?value12) &amp;amp;&amp;amp; str(?value21) = str(?value22) &amp;amp;&amp;amp; str(?value31) = str(?value32))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntactic Accuracy==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Based on Syntax Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values with syntax rule violations.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All syntax rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per syntax rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are not listed as legal values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI &lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty1 ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?rpropvalue)) AS ?rpropURI) .&lt;br /&gt;
    BIND (IRI(str(?rclassvalue)) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?i2 a ?rclassURI .&lt;br /&gt;
        ?i2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Range Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are out of a legal range.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value range rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value range rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (STRDT(str(?value), xsd:float) &amp;gt; ?upperLimit || &lt;br /&gt;
    STRDT(str(?value), xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Semantic Accuracy==&lt;br /&gt;
&lt;br /&gt;
===Based on Functional Dependent Value Rule (1 Condition)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate an approximation of [[Semantic Accuracy]] of an instance regarding the value of a certain property based on the ratio of all instances of a class and instances that have property value combinations that are incorrect.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependent value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Semantic Accuracy]] per functional dependent value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?semanticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    ?i2 ?cpropURI1 ?condvalue1 .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Timeliness==&lt;br /&gt;
===Based on Expiry Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and expired instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All expiry rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per expiry rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND ((now()) AS ?today)&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Update Rules===&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''Please Note:'''&amp;lt;/span&amp;gt; This rule requires the SPARQL extension '''dqf:requiredTimestamp''' in order to work.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and instances that have not been updated in a specific period of time.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All update rules (in OWL DL Design) and the timestamps of the tested instances&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per update rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND((dqf:requiredTimestamp(?duration)) AS ?reqTimestamp) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    FILTER(?reqTimestamp&amp;gt;?timestamp)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports</id>
		<title>Data Quality Assessment Reports</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports"/>
				<updated>2012-05-16T19:35:30Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Completeness (OWL DL) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data Quality Scores can be used to get a quick impression about the quality state of a data source. Below you can find queries that can calculate data quality scores based on pre-defined data requirements on the fly.&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
With the DQM-Vocabulary you can easily create Data Quality Scores. All you need is a SPARQL-Endpoint that supports SPARQL 1.1 or SPARQL extensions that cover datatype conversion and conversion of strings to URIs. Before you can automatically analyze your data for requirement violations, you need to perform the following steps:&lt;br /&gt;
* [[Create Data Requirements#Define Tested Elements|Declare the elements of your ontology that shall be used in the DQM-Vocabulary]]&lt;br /&gt;
* [[Create Data Requirements]]&lt;br /&gt;
&lt;br /&gt;
=Data Quality Score Calculations=&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL DL)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
    NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
            } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL Full)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL Full Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
            } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Depth==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of a property based on the ratio of all instances of a class and instances that have non-unique property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All unique value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness Scores per unique value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI ((COUNT(?i)/2) AS ?violations) (COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessDepth)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?uniqueValue1 .&lt;br /&gt;
    ?i2 ?tpropURI ?uniqueValue2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; (str(?uniqueValue1) = str(?uniqueValue2)))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Scope==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of class instances based on the ratio of all instances of a class and duplicate instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All duplicate instances rules (Example case: 3 tested Properties, OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness in scope scores for classes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI &lt;br /&gt;
((COUNT(?i)/2) AS ?violations)&lt;br /&gt;
(COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessScope)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI1 ?value11 .&lt;br /&gt;
    ?i2 ?tpropURI1 ?value12 . &lt;br /&gt;
    ?i ?tpropURI2 ?value21 . 			&lt;br /&gt;
    ?i2 ?tpropURI2 ?value22 . 			&lt;br /&gt;
    ?i ?tpropURI3 ?value31 . 			&lt;br /&gt;
    ?i2 ?tpropURI3 ?value32 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; str(?value11) = str(?value12) &amp;amp;&amp;amp; str(?value21) = str(?value22) &amp;amp;&amp;amp; str(?value31) = str(?value32))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntactic Accuracy==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Based on Syntax Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values with syntax rule violations.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All syntax rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per syntax rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are not listed as legal values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI &lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty1 ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?rpropvalue)) AS ?rpropURI) .&lt;br /&gt;
    BIND (IRI(str(?rclassvalue)) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?i2 a ?rclassURI .&lt;br /&gt;
        ?i2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Range Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are out of a legal range.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value range rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value range rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (STRDT(str(?value), xsd:float) &amp;gt; ?upperLimit || &lt;br /&gt;
    STRDT(str(?value), xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Semantic Accuracy==&lt;br /&gt;
&lt;br /&gt;
===Based on Functional Dependent Value Rule (1 Condition)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate an approximation of [[Semantic Accuracy]] of an instance regarding the value of a certain property based on the ratio of all instances of a class and instances that have property value combinations that are incorrect.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependent value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Semantic Accuracy]] per functional dependent value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?semanticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    ?i2 ?cpropURI1 ?condvalue1 .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Timeliness==&lt;br /&gt;
===Based on Expiry Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and expired instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All expiry rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per expiry rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND ((now()) AS ?today)&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Update Rules===&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''Please Note:'''&amp;lt;/span&amp;gt; This rule requires the SPARQL extension '''dqf:requiredTimestamp''' in order to work.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and instances that have not been updated in a specific period of time.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All update rules (in OWL DL Design) and the timestamps of the tested instances&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per update rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND((dqf:requiredTimestamp(?duration)) AS ?reqTimestamp) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    FILTER(?reqTimestamp&amp;gt;?timestamp)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports</id>
		<title>Data Quality Assessment Reports</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Assessment_Reports"/>
				<updated>2012-05-16T19:35:10Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Completeness */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data Quality Scores can be used to get a quick impression about the quality state of a data source. Below you can find queries that can calculate data quality scores based on pre-defined data requirements on the fly.&lt;br /&gt;
&lt;br /&gt;
=Prerequisites=&lt;br /&gt;
With the DQM-Vocabulary you can easily create Data Quality Scores. All you need is a SPARQL-Endpoint that supports SPARQL 1.1 or SPARQL extensions that cover datatype conversion and conversion of strings to URIs. Before you can automatically analyze your data for requirement violations, you need to perform the following steps:&lt;br /&gt;
* [[Create Data Requirements#Define Tested Elements|Declare the elements of your ontology that shall be used in the DQM-Vocabulary]]&lt;br /&gt;
* [[Create Data Requirements]]&lt;br /&gt;
&lt;br /&gt;
=Data Quality Score Calculations=&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL DL)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
            } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Completeness (OWL Full)==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the [[Completeness]] of a property based on the ratio of all instances of a class and instances that miss a specific property or property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL Full Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||[[Completeness]] Scores per Property Completeness Requirement&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?s) AS ?violations) (COUNT(?s2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?completeness)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        NOT EXISTS{&lt;br /&gt;
           ?s ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?s a ?tclassURI .&lt;br /&gt;
        ?s ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassURI .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropURI .&lt;br /&gt;
    ?s2 a ?tclassURI .&lt;br /&gt;
            } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Depth==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of a property based on the ratio of all instances of a class and instances that have non-unique property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All unique value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness Scores per unique value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI ((COUNT(?i)/2) AS ?violations) (COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessDepth)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?uniqueValue1 .&lt;br /&gt;
    ?i2 ?tpropURI ?uniqueValue2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; (str(?uniqueValue1) = str(?uniqueValue2)))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Uniqueness in Scope==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate the uniqueness of class instances based on the ratio of all instances of a class and duplicate instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All duplicate instances rules (Example case: 3 tested Properties, OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Uniqueness in scope scores for classes&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI &lt;br /&gt;
((COUNT(?i)/2) AS ?violations)&lt;br /&gt;
(COUNT(?i3) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?uniquenessScope)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI1 ?value11 .&lt;br /&gt;
    ?i2 ?tpropURI1 ?value12 . &lt;br /&gt;
    ?i ?tpropURI2 ?value21 . 			&lt;br /&gt;
    ?i2 ?tpropURI2 ?value22 . 			&lt;br /&gt;
    ?i ?tpropURI3 ?value31 . 			&lt;br /&gt;
    ?i2 ?tpropURI3 ?value32 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; str(?value11) = str(?value12) &amp;amp;&amp;amp; str(?value21) = str(?value22) &amp;amp;&amp;amp; str(?value31) = str(?value32))&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
    ?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
    ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
    ?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
    ?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
    ?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
    ?i3 a ?tclassURI .&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Syntactic Accuracy==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Based on Syntax Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values with syntax rule violations.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All syntax rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per syntax rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}UNION{&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are not listed as legal values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI &lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty1 ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?rpropvalue)) AS ?rpropURI) .&lt;br /&gt;
    BIND (IRI(str(?rclassvalue)) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?i2 a ?rclassURI .&lt;br /&gt;
        ?i2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Legal Value Range Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Syntactic Accuracy]] of a property based on the ratio of all instances of a class and instances that have property values that are out of a legal range.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value range rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Syntactic Accuracy]] per legal value range rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI ?tpropURI (COUNT(?i) AS ?violations) (COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?syntacticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (STRDT(str(?value), xsd:float) &amp;gt; ?upperLimit || &lt;br /&gt;
    STRDT(str(?value), xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI ?tpropURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Semantic Accuracy==&lt;br /&gt;
&lt;br /&gt;
===Based on Functional Dependent Value Rule (1 Condition)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate an approximation of [[Semantic Accuracy]] of an instance regarding the value of a certain property based on the ratio of all instances of a class and instances that have property value combinations that are incorrect.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependent value rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Semantic Accuracy]] per functional dependent value rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?semanticAccuracy)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
    ?i2 ?cpropURI1 ?condvalue1 .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Timeliness==&lt;br /&gt;
===Based on Expiry Rules===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and expired instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All expiry rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per expiry rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND ((now()) AS ?today)&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Based on Update Rules===&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''Please Note:'''&amp;lt;/span&amp;gt; This rule requires the SPARQL extension '''dqf:requiredTimestamp''' in order to work.&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Calculate [[Timeliness]] of class instances based on the ratio of all instances of a class and instances that have not been updated in a specific period of time.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All update rules (in OWL DL Design) and the timestamps of the tested instances&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Score for [[Timeliness]] per update rule&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?tclassURI&lt;br /&gt;
(COUNT(?i) AS ?violations) &lt;br /&gt;
(COUNT(?i2) AS ?total)&lt;br /&gt;
(((?total - ?violations)/?total) AS ?timeliness)&lt;br /&gt;
WHERE {&lt;br /&gt;
  {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND((dqf:requiredTimestamp(?duration)) AS ?reqTimestamp) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    FILTER(?reqTimestamp&amp;gt;?timestamp)&lt;br /&gt;
  }UNION{&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i2 a ?tclassURI .&lt;br /&gt;
  } &lt;br /&gt;
}GROUP BY ?dqr ?tclassURI&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Monitoring_Reports</id>
		<title>Data Quality Monitoring Reports</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Monitoring_Reports"/>
				<updated>2012-03-28T14:58:04Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Example 1.1: Missing Properties / Values (OWL Full Design) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data Quality Monitoring Reports are an excellent instrument to quickly identify instances with requirement violations.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
With the DQM-Vocabulary you can easily create Data Quality Monitoring reports. All you need is a SPARQL-Endpoint that supports [http://www.w3.org/TR/sparql11-query/ SPARQL 1.1] or SPARQL extensions that cover datatype conversion and conversion of strings to [[Wikipedia:URI|URIs]].&lt;br /&gt;
Before you can automatically analyze your data for requirement violations, you need to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
* [[Create Data Requirements#Define Tested Elements|Declare the elements of your ontology that shall be used in the DQM-Vocabulary]]&lt;br /&gt;
* [[Create Data Requirements]]&lt;br /&gt;
&lt;br /&gt;
==Data Quality Reports with SPARQL==&lt;br /&gt;
&lt;br /&gt;
Each type of data requirement has different problem reports, since the nature of data requirements differs. Moreover, the actual SPARQL query you can use depends on the design option you have chosen to make your ontology elements an instance of [[dqm:TestedClass]] and [[dqm:TestedProperty]] (See [[Create Data Requirements#Define Tested Elements]] for an explanation). In the following you find several SPARQL queries that make use of your data requirements to identify class instances with requirement violations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 1.1: Missing Properties / Values (OWL Full Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances of a certain class that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL Full Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with missing properties and values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    {    &lt;br /&gt;
        ?i a ?tclass .&lt;br /&gt;
    FILTER NOT EXISTS{&lt;br /&gt;
           ?i ?tprop ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?i a ?tclass .&lt;br /&gt;
        ?i ?tprop &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 1: Property Completeness Rule |Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 1.2: Missing Properties / Values (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with missing properties and values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?i a ?tclassURI .&lt;br /&gt;
        NOT EXISTS{&lt;br /&gt;
           ?i ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?i a ?tclassURI .&lt;br /&gt;
        ?i ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 1: Property Completeness Rule|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: Conditional Missing Properties / Values (1 Condition, OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances in a subset of a certain class that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All conditional property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Instances with missing properties and values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i ?condvalue&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ConditionalPropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop .&lt;br /&gt;
    ?cprop dqm:hasURI ?cpropreal .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal)) AS ?cpropURI) .&lt;br /&gt;
    {&lt;br /&gt;
       ?i a ?tclassURI .&lt;br /&gt;
       ?i ?cpropURI ?value &lt;br /&gt;
       NOT EXISTS{&lt;br /&gt;
          ?i ?tpropURI ?value1 .&lt;br /&gt;
      }&lt;br /&gt;
    }UNION{ &lt;br /&gt;
       ?i a ?tclassURI .&lt;br /&gt;
       ?i ?cpropURI ?value .&lt;br /&gt;
       ?i ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
    FILTER (str(?value) = str(?condvalue)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 2: Conditional Property Completeness Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 3: Syntax Violations (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances of a certain class with property values that violate a syntax rule.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All syntax rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with property values that have syntax violations&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 3: Syntax Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 4: Conditional Syntax Violations (1 Condition, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all syntax violations of property values in a subset of a certain class.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All conditional syntax rules(in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances of the subset of the class that have syntax violations.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ConditionalSyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop .&lt;br /&gt;
    ?cprop dqm:hasURI ?cpropreal .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal)) AS ?cpropURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI ?condvalueplain .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?condvalue) = str(?condvalueplain) &amp;amp;&amp;amp; !regex(str(?value), ?regex)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 4: Conditional Syntax Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 5: Out of Range Values (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that have property values out of a specified range.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value range rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with out of range values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (STRDT(str(?value), xsd:float) &amp;gt; ?upperLimit || &lt;br /&gt;
    STRDT(str(?value), xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 5: Legal Value Range Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 6: Illegal Values (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that have illegal property values, i.e. values that are not listed in the trusted reference property.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value rules (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with values not listed in the trusted reference.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty1 ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (IRI(str(?rpropvalue)) AS ?rpropURI) .&lt;br /&gt;
    BIND (IRI(str(?rclassvalue)) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?i2 a ?rclassURI .&lt;br /&gt;
        ?i2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 6: Legal Value Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 7: Uniqueness Violations (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with property values that are not unique although they should.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All unique value rules (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with non-unique values of property that must have unique values for each instance.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?uniqueValue1 .&lt;br /&gt;
    ?i2 ?tpropURI ?uniqueValue2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; (str(?uniqueValue1) = str(?uniqueValue2)))&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?i&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 7: Unique Value Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 8: Functional Dependency Violations (1 Condition, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with inconsistent property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependency value rules with 1 condition (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with inconsistent property values.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i ?dvalue ?value&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 8: Functional Dependency Value Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 9: Functional Dependency Violations (2 Conditions, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with inconsistent property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependency value rules with 2 conditions (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with inconsistent property values.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i &lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
    ?cond2 dqm:conditionalProperty ?cprop2 .&lt;br /&gt;
    ?cprop2 dqm:hasURI ?cpropreal2 .&lt;br /&gt;
    ?cond2 dqm:equals ?condvalue2 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal2)) AS ?cpropURI2) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?cpropURI2 ?condvalue2 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 9: Functional Dependency Value Rule (2 Conditions, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: Outdated / Expired Values (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all outdated instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All expiry rules (in OWL DL Design) and validity date of instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with that are not valid anymore.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND ((now()) AS ?today)&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 10: Expiry Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 11: Outdated / Not Updated Values (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all outdated instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All update rules (in OWL DL Design) and timestamps of instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with that are potentially outdated.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND((dqf:requiredTimestamp(str(?duration))) AS ?reqTimestamp) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    FILTER(?reqTimestamp&amp;gt;?timestamp)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 11: Update Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 12: Duplicate Instance Rule (3 Properties, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find duplicate instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||Duplicate instance rules with 3 tested properties.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances that have identical values for the 3 tested properties.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
?dqr dqm:testedClass ?tclass .&lt;br /&gt;
?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
?i a ?tclassURI .&lt;br /&gt;
?i ?tpropURI1 ?value11 .&lt;br /&gt;
?i2 ?tpropURI1 ?value12 . &lt;br /&gt;
?i ?tpropURI2 ?value21 . 			&lt;br /&gt;
?i2 ?tpropURI2 ?value22 . 			&lt;br /&gt;
?i ?tpropURI3 ?value31 . 			&lt;br /&gt;
?i2 ?tpropURI3 ?value32 .&lt;br /&gt;
FILTER(?i!=?i2 &amp;amp;&amp;amp; str(?value11) = str(?value12) &amp;amp;&amp;amp; str(?value21) = str(?value22) &amp;amp;&amp;amp; str(?value31) = str(?value32))&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 13: Functional Dependency Violations (2 Reference Properties, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find functional dependency violations between two property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||Functional dependency reference rules with 2 tested properties.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances that have violating dependencies between the two tested property values.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i &lt;br /&gt;
WHERE {&lt;br /&gt;
?dqr a dqm:FuncDepReferenceRule .&lt;br /&gt;
?dqr dqm:assessment &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
?dqr dqm:testedClass ?tclass . &lt;br /&gt;
?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
 BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
 ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
  BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
 ?dqr dqm:referenceClass ?trefclass . &lt;br /&gt;
 ?trefclass dqm:hasURI ?trefclassreal .&lt;br /&gt;
 BIND (IRI(str(?trefclassreal)) AS ?trefclassURI) .&lt;br /&gt;
?dqr dqm:referenceProperty1 ?trefprop1 .&lt;br /&gt;
?trefprop1 dqm:hasURI ?trefpropreal1 .&lt;br /&gt;
 BIND (IRI(str(?trefpropreal1)) AS ?trefpropURI1) .&lt;br /&gt;
 ?dqr dqm:referenceProperty2 ?trefprop2 .&lt;br /&gt;
?trefprop2 dqm:hasURI ?trefpropreal2 .&lt;br /&gt;
BIND (IRI(str(?trefpropreal2)) AS ?trefpropURI2) .&lt;br /&gt;
?i a ?tclassURI .&lt;br /&gt;
?i ?tpropURI1 ?value1 .&lt;br /&gt;
?i ?tpropURI2 ?value2 .&lt;br /&gt;
BIND(STRDT(str(?value1),xsd:string) AS ?value11 ) &lt;br /&gt;
BIND(STRDT(str(?value2),xsd:string) AS ?value12 ) &lt;br /&gt;
NOT EXISTS{ &lt;br /&gt;
?i2 a ?trefclassURI .&lt;br /&gt;
 ?i2 ?trefpropURI1 ?value11 .&lt;br /&gt;
 ?i2 ?trefpropURI2 ?value12 .&lt;br /&gt;
 }&lt;br /&gt;
}		&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Create_Data_Requirements</id>
		<title>Create Data Requirements</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Create_Data_Requirements"/>
				<updated>2012-03-28T12:28:00Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Examples of Data Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== What are Data Requirements? ==&lt;br /&gt;
&lt;br /&gt;
Data requirements are prescribed directives or consensual agreements that define the content and/or structure that constitute high quality data instances and values. Data requirements can thereby be stated by several different individuals or groups of individuals. Moreover, data requirments may also be based on laws, standards, or other directives. They may be agreed upon or contrary to each other.&lt;br /&gt;
&lt;br /&gt;
However, data requirements are required as a prerequisite to measure data quality. Hence, they serve as a benchmark that defines the desired state of data. In the following, we describe how you can express your data requirements via the DQM-Vocabulary.&lt;br /&gt;
&lt;br /&gt;
== Types of Data Requirements ==&lt;br /&gt;
&lt;br /&gt;
Data requirements usually refer to different data items. When we look at a table we usually have at least four types of data items, (1) columns, (2) rows, (3) schemata, and (4) the table/spreadsheet itself. &lt;br /&gt;
&lt;br /&gt;
[[File:Terminology.png|500px|Table to illustrate used terminology]]&lt;br /&gt;
&lt;br /&gt;
In Semantic Web environments, we can compare columns to properties, rows to instances, schemata to ontologies, and tables to classes. Data requirements can usually be related to one of these elements. In particular, there are &lt;br /&gt;
# data requirements related to the values of a single property (column)&lt;br /&gt;
# data requirements related to the values of multiple properties within an instance (multiple columns in a row)&lt;br /&gt;
# data requirements related to the instances of a whole class (table)&lt;br /&gt;
# data requirements related to the ontology elements (schema)&lt;br /&gt;
&lt;br /&gt;
With the DQM-Vocabulary, you can model the first three types of requirements. Schema/ontology requirements are currently not part of the vocabulary, but may be added in future releases. In the following, we explain how Property-, Multi-Property-, Class-, and Custom-Requirements can be modelled with the current version of the DQM-Vocabulary.&lt;br /&gt;
&lt;br /&gt;
==Define Tested Elements==&lt;br /&gt;
Before you can use your data with the DQM-Vocabulary, you have to declare the elements of your ontology that shall be used in the DQM-Vocabulary. You have two options to do this with impact on decidablility of potential reasoning with your knowledge base:&lt;br /&gt;
&lt;br /&gt;
=== Design Option 1: Classes and Properties as Instances (OWL Full) ===&lt;br /&gt;
Classes and properties that shall be tested for data requirement violations are defined as direct instances of the classes [[dqm:TestedClass]] or [[dqm:TestedProperty]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:MyClass a dqm:TestedClass&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:MyProperty a dqm:TestedProperty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;'''Attention:'''&amp;lt;/span&amp;gt; This will make your knowledge base OWL Full which is potentially not useful if you plan to use reasoning.&lt;br /&gt;
&lt;br /&gt;
=== Design Option 2: Mapping of Classes and Properties to new URIs (OWL DL) ===&lt;br /&gt;
Classes and properties that shall be tested for data requirement violations are mapped to new instances of the classes [[dqm:TestedClass]] and [[dqm:TestedProperty]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Class_1 a dqm:TestedClass&lt;br /&gt;
                dqm:hasURI &amp;quot;http://www.example.org/MyClass&amp;quot;^^xsd:anyURI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Property_1 a dqm:TestedProperty&lt;br /&gt;
                dqm:hasURI &amp;quot;http://www.example.org/MyProperty&amp;quot;^^xsd:anyURI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sample Dataset used in Examples ==&lt;br /&gt;
The following examples use classes and properties from our sample dataset as [[dqm:TestedClass]] and [[dqm:TestedProperties]]. Requirements specified in OWL DL will use the mapped instances, while requirements specified in OWL Full will use the original classes and properties. The data set contains the following classes:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Original Class!!Mapped Instance&lt;br /&gt;
|-&lt;br /&gt;
|foo:Location||foo:Class_Location&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
...with the following datatype properties:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Original Property !! Mapped Instance&lt;br /&gt;
|-&lt;br /&gt;
|foo:LOCID ||foo:Prop_Location_ID&lt;br /&gt;
|-&lt;br /&gt;
|foo:STREET||foo:Prop_Location_Street&lt;br /&gt;
|-&lt;br /&gt;
|foo:STREETNO||foo:Prop_Location_Streetno&lt;br /&gt;
|-&lt;br /&gt;
|foo:ZIP||foo:Prop_Location_ZIP&lt;br /&gt;
|-&lt;br /&gt;
|foo:CITY||foo:Prop_Location_City&lt;br /&gt;
|-&lt;br /&gt;
|foo:COUNTRY||foo:Prop_Location_Country&lt;br /&gt;
|-&lt;br /&gt;
|foo:STATE||foo:Prop_Location_State&lt;br /&gt;
|-&lt;br /&gt;
|foo:validThrough||foo:Prop_validThrough&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to apply the example to your own data, you need to exchange the sample classes and properties used in the data requirements by your own.&lt;br /&gt;
&lt;br /&gt;
==Syntax Of Examples==&lt;br /&gt;
&lt;br /&gt;
The following examples show instance data in [http://www.w3.org/TeamSubmission/turtle/ Turtle/Notation 3 syntax].&lt;br /&gt;
&lt;br /&gt;
== Examples of Data Requirements ==&lt;br /&gt;
&lt;br /&gt;
===Example 1: Property Completeness Rule===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a specific property and/or its values must exist for all instances of a specific class.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:COUNTRY must exist and have a value in all instances of the class foo:Location.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:MissingPropertyAndValue]] [[dqm:MissingProperty]] [[dqm:MissingValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyCompleteness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you defined your data elements in OWL Full ([[#Option 1: Classes and Properties as Instances (OWL Full)|Option 1]]), then you can simply use the URIs of your ontology in the definition of the Property Completeness Rule as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Definition in OWL Full'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
foo:PropertyCompletenessRule_1&lt;br /&gt;
      a       dqm:PropertyCompletenessRule ;&lt;br /&gt;
      dqm:testedClass http://www.example.org/MyClass ;&lt;br /&gt;
      dqm:testedProperty1 http://www.example.org/MyProperty ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 1.1: Missing Properties / Values (OWL Full Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The property [[dqm:requiredProperty]] specifies that the property &amp;quot;MyProperty&amp;quot; must exist in each instance. The property [[dqm:requiredValue]] specifies that a value must exist for property &amp;quot;MyProperty&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you mapped your own ontology elements to new URIs ([[#Option 2: Mapping of Classes and Properties to new URIs (OWL DL)|Option 2]], OWL DL), then the following example will help you to define a Property Completeness Rule:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Definition in OWL-DL'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
foo:PropertyCompletenessRule_1&lt;br /&gt;
      a       dqm:PropertyCompletenessRule ;&lt;br /&gt;
      dqm:testedClass foo:Class_1 ;&lt;br /&gt;
      dqm:testedProperty1 foo:Property_1 ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 1.2: Missing Properties / Values (OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The property [[dqm:requiredProperty]] specifies that the property &amp;quot;MyProperty&amp;quot; which is mapped to &amp;quot;foo:Property_1&amp;quot; must exist in each instance of the class &amp;quot;MyClass&amp;quot; which is mapped to &amp;quot;foo:Class_1&amp;quot;. The property [[dqm:requiredValue]] specifies that also a value must exist for property &amp;quot;foo:Property_1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Example 2: Conditional Property Completeness Rule (1 Condition, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a specific property and/or its values must exist if another property obtains a specific value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:STATE must exist and have a value in all instances of the class foo:Location that have value &amp;quot;USA&amp;quot; for the property foo:COUNTRY.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:MissingPropertyAndValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyCompleteness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To define this data requirement, you must perform the following two steps:&lt;br /&gt;
&lt;br /&gt;
'''1. Define the Condition'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
foo:Condition_USA&lt;br /&gt;
      a       dqm:Condition ;&lt;br /&gt;
      rdfs:label &amp;quot;Condition USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:conditionalProperty foo:Prop_Location_Country ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2. Define the Conditional Property Completeness Rule'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
foo:ConditionalPropertyCompletenessRule_State&lt;br /&gt;
      a       dqm:ConditionalPropertyCompletenessRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Conditional property completeness rule State&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 2: Conditional Missing Properties / Values (1 Condition, OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 3: Syntax Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a specific property must obtain a specific syntax.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:ZIP must contain values with exactly five digits.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:SyntaxViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify syntax requirements by creating an instance of the class [[dqm:SyntaxRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
foo:SyntaxRule_ZIP&lt;br /&gt;
      a       dqm:SyntaxRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Syntax rule ZIP&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:regex &amp;quot;^[0-9]{5}$&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Property_ZIP .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 3: Syntax Violations (OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 4:  Conditional Syntax Rule (1 Condition, OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a specific property must obtain a specific syntax if another property obtains a specific value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:STATE must contain a value with two letters if the property foo:COUNTRY has the value &amp;quot;USA&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:SyntaxViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify a conditional syntax rule, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
'''1.Define Condition'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
foo:Condition_USA&lt;br /&gt;
      a       dqm:Condition ;&lt;br /&gt;
      rdfs:label &amp;quot;Condition USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:conditionalProperty foo:Prop_Location_Country ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2.Define Conditional Syntax Rule'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
foo:ConditionalSyntaxRule_State&lt;br /&gt;
      a       dqm:ConditionalSyntaxRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Conditional syntax rule State&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:regex &amp;quot;^[A-Z]{2}$&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 4: Conditional Syntax Violations (1 Condition, OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5: Legal Value Range Rule (OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify valid value ranges for properties that hold numeric values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a product data set, the property foo:PRICE can never contain negative values.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutOfRangeValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify a legal value range for a property by adding the following instance data to the class [[dqm:LegalValueRangeRule]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
foo:LegalValueRangeRule_Price&lt;br /&gt;
      a       dqm:LegalValueRangeRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Legal value range rule Price&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:lowerLimit &amp;quot;0.00&amp;quot;^^xsd:float ;&lt;br /&gt;
      dqm:testedClass foo:Class_Product ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Product_Price .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The class [[dqm:LegalValueRangeRule]] has the special properties&lt;br /&gt;
* [[dqm:lowerLimit]]&lt;br /&gt;
* [[dqm:upperLimit]]&lt;br /&gt;
&lt;br /&gt;
to specify the lowest and/or highest allowed value.&lt;br /&gt;
&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 5: Out of Range Values (OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 6: Legal Value Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify a reference property that holds the allowed values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:COUNTRY can only contain values of the trusted property foo:legalValue in the trusted class foo:LegalValueCountry.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:IllegalValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify legal values for a specific property, you need to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Create a reference data set or use an existing data set that holds the legal values &lt;br /&gt;
# Specify the class and property which hold the legal values as [[dqm:TrustedClass]] and [[dqm:TrustedProperty]]&lt;br /&gt;
# Create an instance of [[dqm:LegalValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
foo:LegalValueRule_Country&lt;br /&gt;
      a       dqm:LegalValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Legal value rule Country&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:referenceClass foo:TrustedClass_LegalValueCountry ;&lt;br /&gt;
      dqm:referenceProperty1 foo:TrustedProperty_LegalValue ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_Country .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 6: Illegal Values (OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 7: Unique Value Rule (OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a property must be unique.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:LOCID of class foo:Location must only contain unique values.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:UniquenessViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyUniqueness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify that values of a property must be unique by creating an instance of the class [[dqm:UniqueValueRule]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
foo:UniqueValueRule_LOCID&lt;br /&gt;
      a       dqm:UniqueValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Unique value rule LOCID&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_ID .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 7: Uniqueness Violations (OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 8: Functional Dependency Value Rule (1 Condition, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a value of one property must obtain a specific value if a second property has a certain value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In an address data set, the city name &amp;quot;New York&amp;quot; must always have the value &amp;quot;USA&amp;quot; for the property foo:COUNTRY.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:FunctionalDependencyViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SemanticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify the dependency between two property values, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Define a condition under which a specific value is always required. &lt;br /&gt;
# Create an instance of the class [[dqm:FuncDepValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
foo:FuncDepValueRule_1&lt;br /&gt;
      a       dqm:FuncDepValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Func dep value rule 1&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_New_York ;&lt;br /&gt;
      dqm:reqDescription &amp;quot;If the city value is \&amp;quot;New York\&amp;quot; then the country must be     &lt;br /&gt;
                         \&amp;quot;USA\&amp;quot;.&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_Country .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 8: Functional Dependency Violations (1 Condition, OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 9: Functional Dependency Value Rule (2 Conditions, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a value of one property must obtain a specific value if a second and third property have specific values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In an address data set, the city &amp;quot;New York&amp;quot; in the country &amp;quot;USA&amp;quot; must always have the value &amp;quot;NY&amp;quot; for the property foo:STATE.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:FunctionalDependencyViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SemanticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify the dependency between three property values, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Define both conditions under which a specific value is always required. &lt;br /&gt;
# Create an instance of the class [[dqm:FuncDepValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
foo:FuncDepValueRule_2&lt;br /&gt;
      a       dqm:FuncDepValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Func dep value rule 2&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:equals &amp;quot;NY&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:hasCondition2 foo:Condition_New_York ;&lt;br /&gt;
      dqm:reqDescription &amp;quot;If the city value is \&amp;quot;New York\&amp;quot; and the country value is &lt;br /&gt;
                         \&amp;quot;USA\&amp;quot; then the state must be \&amp;quot;NY\&amp;quot;.&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 9: Functional Dependency Violations (2 Conditions, OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 10: Expiry Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that instances of a specific class expire.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a product data set, the class foo:Product has instances with product offerings that expire on a certain date which is specified via the property foo:validThrough.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutdatedInstance]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:Timeliness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:ClassRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify that instances of a class have an expiry date by creating an instance of class [[dqm:ExpiryRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
foo:ExpiryRule_1&lt;br /&gt;
      a       dqm:ExpiryRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Expiry rule 1&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Product ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Product_validThrough .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 10: Outdated / Expired Values (OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 11: Update Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that instances of a specific class must be updated within a specified interval.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the class foo:Location has instances with address data that have timestamps of the last update. The instances shall not be elder than 1 year 2 months 3 days 5 hours 20 minutes and 30.123 seconds.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutdatedInstance]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:Timeliness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:ClassRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify a required update interval for instances of a specific property by creating an instance of class [[dqm:UpdateRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
foo:UpdateRule_Location&lt;br /&gt;
      a       dqm:UpdateRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Update rule Location&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:expectedUpdateInterval &amp;quot;P1Y2M3DT5H20M30.123S&amp;quot;^^xsd:duration ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_timestamp .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''NOTE:'''&amp;lt;/span&amp;gt; The tested class must have a property that holds the time of the last update in order to be able to specify this requirement.&lt;br /&gt;
&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 11: Outdated / Not Updated Values (OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Create_Data_Requirements</id>
		<title>Create Data Requirements</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Create_Data_Requirements"/>
				<updated>2012-03-28T12:26:23Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Example 1: Property Completeness Rule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== What are Data Requirements? ==&lt;br /&gt;
&lt;br /&gt;
Data requirements are prescribed directives or consensual agreements that define the content and/or structure that constitute high quality data instances and values. Data requirements can thereby be stated by several different individuals or groups of individuals. Moreover, data requirments may also be based on laws, standards, or other directives. They may be agreed upon or contrary to each other.&lt;br /&gt;
&lt;br /&gt;
However, data requirements are required as a prerequisite to measure data quality. Hence, they serve as a benchmark that defines the desired state of data. In the following, we describe how you can express your data requirements via the DQM-Vocabulary.&lt;br /&gt;
&lt;br /&gt;
== Types of Data Requirements ==&lt;br /&gt;
&lt;br /&gt;
Data requirements usually refer to different data items. When we look at a table we usually have at least four types of data items, (1) columns, (2) rows, (3) schemata, and (4) the table/spreadsheet itself. &lt;br /&gt;
&lt;br /&gt;
[[File:Terminology.png|500px|Table to illustrate used terminology]]&lt;br /&gt;
&lt;br /&gt;
In Semantic Web environments, we can compare columns to properties, rows to instances, schemata to ontologies, and tables to classes. Data requirements can usually be related to one of these elements. In particular, there are &lt;br /&gt;
# data requirements related to the values of a single property (column)&lt;br /&gt;
# data requirements related to the values of multiple properties within an instance (multiple columns in a row)&lt;br /&gt;
# data requirements related to the instances of a whole class (table)&lt;br /&gt;
# data requirements related to the ontology elements (schema)&lt;br /&gt;
&lt;br /&gt;
With the DQM-Vocabulary, you can model the first three types of requirements. Schema/ontology requirements are currently not part of the vocabulary, but may be added in future releases. In the following, we explain how Property-, Multi-Property-, Class-, and Custom-Requirements can be modelled with the current version of the DQM-Vocabulary.&lt;br /&gt;
&lt;br /&gt;
==Define Tested Elements==&lt;br /&gt;
Before you can use your data with the DQM-Vocabulary, you have to declare the elements of your ontology that shall be used in the DQM-Vocabulary. You have two options to do this with impact on decidablility of potential reasoning with your knowledge base:&lt;br /&gt;
&lt;br /&gt;
=== Design Option 1: Classes and Properties as Instances (OWL Full) ===&lt;br /&gt;
Classes and properties that shall be tested for data requirement violations are defined as direct instances of the classes [[dqm:TestedClass]] or [[dqm:TestedProperty]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:MyClass a dqm:TestedClass&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:MyProperty a dqm:TestedProperty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;'''Attention:'''&amp;lt;/span&amp;gt; This will make your knowledge base OWL Full which is potentially not useful if you plan to use reasoning.&lt;br /&gt;
&lt;br /&gt;
=== Design Option 2: Mapping of Classes and Properties to new URIs (OWL DL) ===&lt;br /&gt;
Classes and properties that shall be tested for data requirement violations are mapped to new instances of the classes [[dqm:TestedClass]] and [[dqm:TestedProperty]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Class_1 a dqm:TestedClass&lt;br /&gt;
                dqm:hasURI &amp;quot;http://www.example.org/MyClass&amp;quot;^^xsd:anyURI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Property_1 a dqm:TestedProperty&lt;br /&gt;
                dqm:hasURI &amp;quot;http://www.example.org/MyProperty&amp;quot;^^xsd:anyURI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sample Dataset used in Examples ==&lt;br /&gt;
The following examples use classes and properties from our sample dataset as [[dqm:TestedClass]] and [[dqm:TestedProperties]]. Requirements specified in OWL DL will use the mapped instances, while requirements specified in OWL Full will use the original classes and properties. The data set contains the following classes:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Original Class!!Mapped Instance&lt;br /&gt;
|-&lt;br /&gt;
|foo:Location||foo:Class_Location&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
...with the following datatype properties:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Original Property !! Mapped Instance&lt;br /&gt;
|-&lt;br /&gt;
|foo:LOCID ||foo:Prop_Location_ID&lt;br /&gt;
|-&lt;br /&gt;
|foo:STREET||foo:Prop_Location_Street&lt;br /&gt;
|-&lt;br /&gt;
|foo:STREETNO||foo:Prop_Location_Streetno&lt;br /&gt;
|-&lt;br /&gt;
|foo:ZIP||foo:Prop_Location_ZIP&lt;br /&gt;
|-&lt;br /&gt;
|foo:CITY||foo:Prop_Location_City&lt;br /&gt;
|-&lt;br /&gt;
|foo:COUNTRY||foo:Prop_Location_Country&lt;br /&gt;
|-&lt;br /&gt;
|foo:STATE||foo:Prop_Location_State&lt;br /&gt;
|-&lt;br /&gt;
|foo:validThrough||foo:Prop_validThrough&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to apply the example to your own data, you need to exchange the sample classes and properties used in the data requirements by your own.&lt;br /&gt;
&lt;br /&gt;
==Syntax Of Examples==&lt;br /&gt;
&lt;br /&gt;
The following examples show instance data in [http://www.w3.org/TeamSubmission/turtle/ Turtle/Notation 3 syntax].&lt;br /&gt;
&lt;br /&gt;
== Examples of Data Requirements ==&lt;br /&gt;
&lt;br /&gt;
===Example 1: Property Completeness Rule===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a specific property and/or its values must exist for all instances of a specific class.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:COUNTRY must exist and have a value in all instances of the class foo:Location.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:MissingPropertyAndValue]] [[dqm:MissingProperty]] [[dqm:MissingValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyCompleteness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you defined your data elements in OWL Full ([[#Option 1: Classes and Properties as Instances (OWL Full)|Option 1]]), then you can simply use the URIs of your ontology in the definition of the Property Completeness Rule as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Definition in OWL Full'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
foo:PropertyCompletenessRule_1&lt;br /&gt;
      a       dqm:PropertyCompletenessRule ;&lt;br /&gt;
      dqm:testedClass http://www.example.org/MyClass ;&lt;br /&gt;
      dqm:testedProperty1 http://www.example.org/MyProperty ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 1.1: Missing Properties / Values (OWL Full Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The property [[dqm:requiredProperty]] specifies that the property &amp;quot;MyProperty&amp;quot; must exist in each instance. The property [[dqm:requiredValue]] specifies that a value must exist for property &amp;quot;MyProperty&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you mapped your own ontology elements to new URIs ([[#Option 2: Mapping of Classes and Properties to new URIs (OWL DL)|Option 2]], OWL DL), then the following example will help you to define a Property Completeness Rule:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Definition in OWL-DL'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:PropertyCompletenessRule_1&lt;br /&gt;
      a       dqm:PropertyCompletenessRule ;&lt;br /&gt;
      dqm:testedClass foo:Class_1 ;&lt;br /&gt;
      dqm:testedProperty1 foo:Property_1 ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 1.2: Missing Properties / Values (OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The property [[dqm:requiredProperty]] specifies that the property &amp;quot;MyProperty&amp;quot; which is mapped to &amp;quot;foo:Property_1&amp;quot; must exist in each instance of the class &amp;quot;MyClass&amp;quot; which is mapped to &amp;quot;foo:Class_1&amp;quot;. The property [[dqm:requiredValue]] specifies that also a value must exist for property &amp;quot;foo:Property_1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Example 2: Conditional Property Completeness Rule (1 Condition, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a specific property and/or its values must exist if another property obtains a specific value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:STATE must exist and have a value in all instances of the class foo:Location that have value &amp;quot;USA&amp;quot; for the property foo:COUNTRY.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:MissingPropertyAndValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyCompleteness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To define this data requirement, you must perform the following two steps:&lt;br /&gt;
&lt;br /&gt;
'''1. Define the Condition'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Condition_USA&lt;br /&gt;
      a       dqm:Condition ;&lt;br /&gt;
      rdfs:label &amp;quot;Condition USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:conditionalProperty foo:Prop_Location_Country ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2. Define the Conditional Property Completeness Rule'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ConditionalPropertyCompletenessRule_State&lt;br /&gt;
      a       dqm:ConditionalPropertyCompletenessRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Conditional property completeness rule State&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 2: Conditional Missing Properties / Values (1 Condition, OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 3: Syntax Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a specific property must obtain a specific syntax.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:ZIP must contain values with exactly five digits.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:SyntaxViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify syntax requirements by creating an instance of the class [[dqm:SyntaxRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:SyntaxRule_ZIP&lt;br /&gt;
      a       dqm:SyntaxRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Syntax rule ZIP&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:regex &amp;quot;^[0-9]{5}$&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Property_ZIP .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 3: Syntax Violations (OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 4:  Conditional Syntax Rule (1 Condition, OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a specific property must obtain a specific syntax if another property obtains a specific value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:STATE must contain a value with two letters if the property foo:COUNTRY has the value &amp;quot;USA&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:SyntaxViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify a conditional syntax rule, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
'''1.Define Condition'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Condition_USA&lt;br /&gt;
      a       dqm:Condition ;&lt;br /&gt;
      rdfs:label &amp;quot;Condition USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:conditionalProperty foo:Prop_Location_Country ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2.Define Conditional Syntax Rule'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ConditionalSyntaxRule_State&lt;br /&gt;
      a       dqm:ConditionalSyntaxRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Conditional syntax rule State&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:regex &amp;quot;^[A-Z]{2}$&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 4: Conditional Syntax Violations (1 Condition, OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5: Legal Value Range Rule (OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify valid value ranges for properties that hold numeric values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a product data set, the property foo:PRICE can never contain negative values.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutOfRangeValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify a legal value range for a property by adding the following instance data to the class [[dqm:LegalValueRangeRule]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:LegalValueRangeRule_Price&lt;br /&gt;
      a       dqm:LegalValueRangeRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Legal value range rule Price&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:lowerLimit &amp;quot;0.00&amp;quot;^^xsd:float ;&lt;br /&gt;
      dqm:testedClass foo:Class_Product ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Product_Price .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The class [[dqm:LegalValueRangeRule]] has the special properties&lt;br /&gt;
* [[dqm:lowerLimit]]&lt;br /&gt;
* [[dqm:upperLimit]]&lt;br /&gt;
&lt;br /&gt;
to specify the lowest and/or highest allowed value.&lt;br /&gt;
&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 5: Out of Range Values (OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 6: Legal Value Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify a reference property that holds the allowed values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:COUNTRY can only contain values of the trusted property foo:legalValue in the trusted class foo:LegalValueCountry.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:IllegalValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify legal values for a specific property, you need to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Create a reference data set or use an existing data set that holds the legal values &lt;br /&gt;
# Specify the class and property which hold the legal values as [[dqm:TrustedClass]] and [[dqm:TrustedProperty]]&lt;br /&gt;
# Create an instance of [[dqm:LegalValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:LegalValueRule_Country&lt;br /&gt;
      a       dqm:LegalValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Legal value rule Country&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:referenceClass foo:TrustedClass_LegalValueCountry ;&lt;br /&gt;
      dqm:referenceProperty1 foo:TrustedProperty_LegalValue ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_Country .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 6: Illegal Values (OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 7: Unique Value Rule (OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a property must be unique.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:LOCID of class foo:Location must only contain unique values.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:UniquenessViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyUniqueness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify that values of a property must be unique by creating an instance of the class [[dqm:UniqueValueRule]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:UniqueValueRule_LOCID&lt;br /&gt;
      a       dqm:UniqueValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Unique value rule LOCID&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_ID .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 7: Uniqueness Violations (OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 8: Functional Dependency Value Rule (1 Condition, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a value of one property must obtain a specific value if a second property has a certain value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In an address data set, the city name &amp;quot;New York&amp;quot; must always have the value &amp;quot;USA&amp;quot; for the property foo:COUNTRY.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:FunctionalDependencyViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SemanticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify the dependency between two property values, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Define a condition under which a specific value is always required. &lt;br /&gt;
# Create an instance of the class [[dqm:FuncDepValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:FuncDepValueRule_1&lt;br /&gt;
      a       dqm:FuncDepValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Func dep value rule 1&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_New_York ;&lt;br /&gt;
      dqm:reqDescription &amp;quot;If the city value is \&amp;quot;New York\&amp;quot; then the country must be     &lt;br /&gt;
                         \&amp;quot;USA\&amp;quot;.&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_Country .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 8: Functional Dependency Violations (1 Condition, OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 9: Functional Dependency Value Rule (2 Conditions, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a value of one property must obtain a specific value if a second and third property have specific values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In an address data set, the city &amp;quot;New York&amp;quot; in the country &amp;quot;USA&amp;quot; must always have the value &amp;quot;NY&amp;quot; for the property foo:STATE.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:FunctionalDependencyViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SemanticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify the dependency between three property values, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Define both conditions under which a specific value is always required. &lt;br /&gt;
# Create an instance of the class [[dqm:FuncDepValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:FuncDepValueRule_2&lt;br /&gt;
      a       dqm:FuncDepValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Func dep value rule 2&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:equals &amp;quot;NY&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:hasCondition2 foo:Condition_New_York ;&lt;br /&gt;
      dqm:reqDescription &amp;quot;If the city value is \&amp;quot;New York\&amp;quot; and the country value is &lt;br /&gt;
                         \&amp;quot;USA\&amp;quot; then the state must be \&amp;quot;NY\&amp;quot;.&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 9: Functional Dependency Violations (2 Conditions, OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 10: Expiry Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that instances of a specific class expire.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a product data set, the class foo:Product has instances with product offerings that expire on a certain date which is specified via the property foo:validThrough.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutdatedInstance]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:Timeliness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:ClassRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify that instances of a class have an expiry date by creating an instance of class [[dqm:ExpiryRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ExpiryRule_1&lt;br /&gt;
      a       dqm:ExpiryRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Expiry rule 1&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Product ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Product_validThrough .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 10: Outdated / Expired Values (OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 11: Update Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that instances of a specific class must be updated within a specified interval.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the class foo:Location has instances with address data that have timestamps of the last update. The instances shall not be elder than 1 year 2 months 3 days 5 hours 20 minutes and 30.123 seconds.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutdatedInstance]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:Timeliness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:ClassRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify a required update interval for instances of a specific property by creating an instance of class [[dqm:UpdateRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:UpdateRule_Location&lt;br /&gt;
      a       dqm:UpdateRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Update rule Location&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:expectedUpdateInterval &amp;quot;P1Y2M3DT5H20M30.123S&amp;quot;^^xsd:duration ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_timestamp .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''NOTE:'''&amp;lt;/span&amp;gt; The tested class must have a property that holds the time of the last update in order to be able to specify this requirement.&lt;br /&gt;
&lt;br /&gt;
[[Data Quality Monitoring Reports#Example 11: Outdated / Not Updated Values (OWL DL Design)|Click here to learn how to generate a monitoring report from this]]&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Monitoring_Reports</id>
		<title>Data Quality Monitoring Reports</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Monitoring_Reports"/>
				<updated>2012-03-28T12:25:31Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Example 1.1: Missing Properties / Values (OWL Full Design) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data Quality Monitoring Reports are an excellent instrument to quickly identify instances with requirement violations.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
With the DQM-Vocabulary you can easily create Data Quality Monitoring reports. All you need is a SPARQL-Endpoint that supports [http://www.w3.org/TR/sparql11-query/ SPARQL 1.1] or SPARQL extensions that cover datatype conversion and conversion of strings to [[Wikipedia:URI|URIs]].&lt;br /&gt;
Before you can automatically analyze your data for requirement violations, you need to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
* [[Create Data Requirements#Define Tested Elements|Declare the elements of your ontology that shall be used in the DQM-Vocabulary]]&lt;br /&gt;
* [[Create Data Requirements]]&lt;br /&gt;
&lt;br /&gt;
==Data Quality Reports with SPARQL==&lt;br /&gt;
&lt;br /&gt;
Each type of data requirement has different problem reports, since the nature of data requirements differs. Moreover, the actual SPARQL query you can use depends on the design option you have chosen to make your ontology elements an instance of [[dqm:TestedClass]] and [[dqm:TestedProperty]] (See [[Create Data Requirements#Define Tested Elements]] for an explanation). In the following you find several SPARQL queries that make use of your data requirements to identify class instances with requirement violations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 1.1: Missing Properties / Values (OWL Full Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances of a certain class that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL Full Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with missing properties and values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    {    &lt;br /&gt;
        ?i a ?tclass .&lt;br /&gt;
        NOT EXISTS{&lt;br /&gt;
           ?i ?tprop ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?i a ?tclass .&lt;br /&gt;
        ?i ?tprop &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 1: Property Completeness Rule |Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 1.2: Missing Properties / Values (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with missing properties and values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?i a ?tclassURI .&lt;br /&gt;
        NOT EXISTS{&lt;br /&gt;
           ?i ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?i a ?tclassURI .&lt;br /&gt;
        ?i ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 1: Property Completeness Rule|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: Conditional Missing Properties / Values (1 Condition, OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances in a subset of a certain class that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All conditional property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Instances with missing properties and values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i ?condvalue&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ConditionalPropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop .&lt;br /&gt;
    ?cprop dqm:hasURI ?cpropreal .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal)) AS ?cpropURI) .&lt;br /&gt;
    {&lt;br /&gt;
       ?i a ?tclassURI .&lt;br /&gt;
       ?i ?cpropURI ?value &lt;br /&gt;
       NOT EXISTS{&lt;br /&gt;
          ?i ?tpropURI ?value1 .&lt;br /&gt;
      }&lt;br /&gt;
    }UNION{ &lt;br /&gt;
       ?i a ?tclassURI .&lt;br /&gt;
       ?i ?cpropURI ?value .&lt;br /&gt;
       ?i ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
    FILTER (str(?value) = str(?condvalue)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 2: Conditional Property Completeness Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 3: Syntax Violations (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances of a certain class with property values that violate a syntax rule.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All syntax rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with property values that have syntax violations&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 3: Syntax Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 4: Conditional Syntax Violations (1 Condition, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all syntax violations of property values in a subset of a certain class.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All conditional syntax rules(in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances of the subset of the class that have syntax violations.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ConditionalSyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop .&lt;br /&gt;
    ?cprop dqm:hasURI ?cpropreal .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal)) AS ?cpropURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI ?condvalueplain .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?condvalue) = str(?condvalueplain) &amp;amp;&amp;amp; !regex(str(?value), ?regex)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 4: Conditional Syntax Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 5: Out of Range Values (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that have property values out of a specified range.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value range rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with out of range values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (STRDT(str(?value), xsd:float) &amp;gt; ?upperLimit || &lt;br /&gt;
    STRDT(str(?value), xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 5: Legal Value Range Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 6: Illegal Values (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that have illegal property values, i.e. values that are not listed in the trusted reference property.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value rules (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with values not listed in the trusted reference.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty1 ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (IRI(str(?rpropvalue)) AS ?rpropURI) .&lt;br /&gt;
    BIND (IRI(str(?rclassvalue)) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?i2 a ?rclassURI .&lt;br /&gt;
        ?i2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 6: Legal Value Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 7: Uniqueness Violations (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with property values that are not unique although they should.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All unique value rules (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with non-unique values of property that must have unique values for each instance.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?uniqueValue1 .&lt;br /&gt;
    ?i2 ?tpropURI ?uniqueValue2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; (str(?uniqueValue1) = str(?uniqueValue2)))&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?i&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 7: Unique Value Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 8: Functional Dependency Violations (1 Condition, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with inconsistent property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependency value rules with 1 condition (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with inconsistent property values.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i ?dvalue ?value&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 8: Functional Dependency Value Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 9: Functional Dependency Violations (2 Conditions, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with inconsistent property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependency value rules with 2 conditions (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with inconsistent property values.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i &lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
    ?cond2 dqm:conditionalProperty ?cprop2 .&lt;br /&gt;
    ?cprop2 dqm:hasURI ?cpropreal2 .&lt;br /&gt;
    ?cond2 dqm:equals ?condvalue2 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal2)) AS ?cpropURI2) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?cpropURI2 ?condvalue2 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 9: Functional Dependency Value Rule (2 Conditions, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: Outdated / Expired Values (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all outdated instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All expiry rules (in OWL DL Design) and validity date of instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with that are not valid anymore.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND ((now()) AS ?today)&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 10: Expiry Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 11: Outdated / Not Updated Values (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all outdated instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All update rules (in OWL DL Design) and timestamps of instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with that are potentially outdated.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND((dqf:requiredTimestamp(str(?duration))) AS ?reqTimestamp) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    FILTER(?reqTimestamp&amp;gt;?timestamp)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 11: Update Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 12: Duplicate Instance Rule (3 Properties, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find duplicate instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||Duplicate instance rules with 3 tested properties.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances that have identical values for the 3 tested properties.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
?dqr dqm:testedClass ?tclass .&lt;br /&gt;
?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
?i a ?tclassURI .&lt;br /&gt;
?i ?tpropURI1 ?value11 .&lt;br /&gt;
?i2 ?tpropURI1 ?value12 . &lt;br /&gt;
?i ?tpropURI2 ?value21 . 			&lt;br /&gt;
?i2 ?tpropURI2 ?value22 . 			&lt;br /&gt;
?i ?tpropURI3 ?value31 . 			&lt;br /&gt;
?i2 ?tpropURI3 ?value32 .&lt;br /&gt;
FILTER(?i!=?i2 &amp;amp;&amp;amp; str(?value11) = str(?value12) &amp;amp;&amp;amp; str(?value21) = str(?value22) &amp;amp;&amp;amp; str(?value31) = str(?value32))&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 13: Functional Dependency Violations (2 Reference Properties, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find functional dependency violations between two property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||Functional dependency reference rules with 2 tested properties.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances that have violating dependencies between the two tested property values.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i &lt;br /&gt;
WHERE {&lt;br /&gt;
?dqr a dqm:FuncDepReferenceRule .&lt;br /&gt;
?dqr dqm:assessment &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
?dqr dqm:testedClass ?tclass . &lt;br /&gt;
?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
 BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
 ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
  BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
 ?dqr dqm:referenceClass ?trefclass . &lt;br /&gt;
 ?trefclass dqm:hasURI ?trefclassreal .&lt;br /&gt;
 BIND (IRI(str(?trefclassreal)) AS ?trefclassURI) .&lt;br /&gt;
?dqr dqm:referenceProperty1 ?trefprop1 .&lt;br /&gt;
?trefprop1 dqm:hasURI ?trefpropreal1 .&lt;br /&gt;
 BIND (IRI(str(?trefpropreal1)) AS ?trefpropURI1) .&lt;br /&gt;
 ?dqr dqm:referenceProperty2 ?trefprop2 .&lt;br /&gt;
?trefprop2 dqm:hasURI ?trefpropreal2 .&lt;br /&gt;
BIND (IRI(str(?trefpropreal2)) AS ?trefpropURI2) .&lt;br /&gt;
?i a ?tclassURI .&lt;br /&gt;
?i ?tpropURI1 ?value1 .&lt;br /&gt;
?i ?tpropURI2 ?value2 .&lt;br /&gt;
BIND(STRDT(str(?value1),xsd:string) AS ?value11 ) &lt;br /&gt;
BIND(STRDT(str(?value2),xsd:string) AS ?value12 ) &lt;br /&gt;
NOT EXISTS{ &lt;br /&gt;
?i2 a ?trefclassURI .&lt;br /&gt;
 ?i2 ?trefpropURI1 ?value11 .&lt;br /&gt;
 ?i2 ?trefpropURI2 ?value12 .&lt;br /&gt;
 }&lt;br /&gt;
}		&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Monitoring_Reports</id>
		<title>Data Quality Monitoring Reports</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Monitoring_Reports"/>
				<updated>2012-03-28T12:25:00Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Example 1.1: Missing Properties / Values (OWL Full Design) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Data Quality Monitoring Reports are an excellent instrument to quickly identify instances with requirement violations.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
With the DQM-Vocabulary you can easily create Data Quality Monitoring reports. All you need is a SPARQL-Endpoint that supports [http://www.w3.org/TR/sparql11-query/ SPARQL 1.1] or SPARQL extensions that cover datatype conversion and conversion of strings to [[Wikipedia:URI|URIs]].&lt;br /&gt;
Before you can automatically analyze your data for requirement violations, you need to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
* [[Create Data Requirements#Define Tested Elements|Declare the elements of your ontology that shall be used in the DQM-Vocabulary]]&lt;br /&gt;
* [[Create Data Requirements]]&lt;br /&gt;
&lt;br /&gt;
==Data Quality Reports with SPARQL==&lt;br /&gt;
&lt;br /&gt;
Each type of data requirement has different problem reports, since the nature of data requirements differs. Moreover, the actual SPARQL query you can use depends on the design option you have chosen to make your ontology elements an instance of [[dqm:TestedClass]] and [[dqm:TestedProperty]] (See [[Create Data Requirements#Define Tested Elements]] for an explanation). In the following you find several SPARQL queries that make use of your data requirements to identify class instances with requirement violations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 1.1: Missing Properties / Values (OWL Full Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances of a certain class that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL Full Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with missing properties and values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;n3&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    {    &lt;br /&gt;
        ?i a ?tclass .&lt;br /&gt;
        NOT EXISTS{&lt;br /&gt;
           ?i ?tprop ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?i a ?tclass .&lt;br /&gt;
        ?i ?tprop &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 1: Property Completeness Rule |Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 1.2: Missing Properties / Values (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with missing properties and values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?i a ?tclassURI .&lt;br /&gt;
        NOT EXISTS{&lt;br /&gt;
           ?i ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?i a ?tclassURI .&lt;br /&gt;
        ?i ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 1: Property Completeness Rule|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: Conditional Missing Properties / Values (1 Condition, OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances in a subset of a certain class that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All conditional property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Instances with missing properties and values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i ?condvalue&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ConditionalPropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop .&lt;br /&gt;
    ?cprop dqm:hasURI ?cpropreal .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal)) AS ?cpropURI) .&lt;br /&gt;
    {&lt;br /&gt;
       ?i a ?tclassURI .&lt;br /&gt;
       ?i ?cpropURI ?value &lt;br /&gt;
       NOT EXISTS{&lt;br /&gt;
          ?i ?tpropURI ?value1 .&lt;br /&gt;
      }&lt;br /&gt;
    }UNION{ &lt;br /&gt;
       ?i a ?tclassURI .&lt;br /&gt;
       ?i ?cpropURI ?value .&lt;br /&gt;
       ?i ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
    FILTER (str(?value) = str(?condvalue)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 2: Conditional Property Completeness Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 3: Syntax Violations (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances of a certain class with property values that violate a syntax rule.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All syntax rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with property values that have syntax violations&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 3: Syntax Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 4: Conditional Syntax Violations (1 Condition, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all syntax violations of property values in a subset of a certain class.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All conditional syntax rules(in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances of the subset of the class that have syntax violations.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ConditionalSyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop .&lt;br /&gt;
    ?cprop dqm:hasURI ?cpropreal .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal)) AS ?cpropURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI ?condvalueplain .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?condvalue) = str(?condvalueplain) &amp;amp;&amp;amp; !regex(str(?value), ?regex)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 4: Conditional Syntax Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 5: Out of Range Values (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that have property values out of a specified range.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value range rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with out of range values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (STRDT(str(?value), xsd:float) &amp;gt; ?upperLimit || &lt;br /&gt;
    STRDT(str(?value), xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 5: Legal Value Range Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 6: Illegal Values (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that have illegal property values, i.e. values that are not listed in the trusted reference property.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value rules (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with values not listed in the trusted reference.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty1 ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (IRI(str(?rpropvalue)) AS ?rpropURI) .&lt;br /&gt;
    BIND (IRI(str(?rclassvalue)) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?i2 a ?rclassURI .&lt;br /&gt;
        ?i2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 6: Legal Value Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 7: Uniqueness Violations (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with property values that are not unique although they should.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All unique value rules (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with non-unique values of property that must have unique values for each instance.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?uniqueValue1 .&lt;br /&gt;
    ?i2 ?tpropURI ?uniqueValue2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; (str(?uniqueValue1) = str(?uniqueValue2)))&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?i&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 7: Unique Value Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 8: Functional Dependency Violations (1 Condition, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with inconsistent property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependency value rules with 1 condition (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with inconsistent property values.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i ?dvalue ?value&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 8: Functional Dependency Value Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 9: Functional Dependency Violations (2 Conditions, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with inconsistent property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependency value rules with 2 conditions (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with inconsistent property values.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i &lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
    ?cond2 dqm:conditionalProperty ?cprop2 .&lt;br /&gt;
    ?cprop2 dqm:hasURI ?cpropreal2 .&lt;br /&gt;
    ?cond2 dqm:equals ?condvalue2 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal2)) AS ?cpropURI2) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?cpropURI2 ?condvalue2 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 9: Functional Dependency Value Rule (2 Conditions, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: Outdated / Expired Values (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all outdated instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All expiry rules (in OWL DL Design) and validity date of instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with that are not valid anymore.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND ((now()) AS ?today)&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 10: Expiry Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 11: Outdated / Not Updated Values (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all outdated instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All update rules (in OWL DL Design) and timestamps of instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with that are potentially outdated.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND((dqf:requiredTimestamp(str(?duration))) AS ?reqTimestamp) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    FILTER(?reqTimestamp&amp;gt;?timestamp)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 11: Update Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 12: Duplicate Instance Rule (3 Properties, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find duplicate instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||Duplicate instance rules with 3 tested properties.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances that have identical values for the 3 tested properties.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
?dqr dqm:testedClass ?tclass .&lt;br /&gt;
?tclass dqm:hasURI ?tclassreal .   &lt;br /&gt;
BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
?dqr dqm:testedProperty3 ?tprop3 .&lt;br /&gt;
?tprop3 dqm:hasURI ?tpropreal3 .&lt;br /&gt;
BIND (IRI(str(?tpropreal3)) AS ?tpropURI3) .&lt;br /&gt;
?i a ?tclassURI .&lt;br /&gt;
?i ?tpropURI1 ?value11 .&lt;br /&gt;
?i2 ?tpropURI1 ?value12 . &lt;br /&gt;
?i ?tpropURI2 ?value21 . 			&lt;br /&gt;
?i2 ?tpropURI2 ?value22 . 			&lt;br /&gt;
?i ?tpropURI3 ?value31 . 			&lt;br /&gt;
?i2 ?tpropURI3 ?value32 .&lt;br /&gt;
FILTER(?i!=?i2 &amp;amp;&amp;amp; str(?value11) = str(?value12) &amp;amp;&amp;amp; str(?value21) = str(?value22) &amp;amp;&amp;amp; str(?value31) = str(?value32))&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 13: Functional Dependency Violations (2 Reference Properties, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find functional dependency violations between two property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||Functional dependency reference rules with 2 tested properties.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances that have violating dependencies between the two tested property values.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
PREFIX dqm:&amp;lt;http://purl.org/dqm-vocabulary/v1.1/dqm#&amp;gt;&lt;br /&gt;
PREFIX xsd:&amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i &lt;br /&gt;
WHERE {&lt;br /&gt;
?dqr a dqm:FuncDepReferenceRule .&lt;br /&gt;
?dqr dqm:assessment &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
?dqr dqm:testedClass ?tclass . &lt;br /&gt;
?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
?dqr dqm:testedProperty1 ?tprop1 .&lt;br /&gt;
?tprop1 dqm:hasURI ?tpropreal1 .&lt;br /&gt;
 BIND (IRI(str(?tpropreal1)) AS ?tpropURI1) .&lt;br /&gt;
 ?dqr dqm:testedProperty2 ?tprop2 .&lt;br /&gt;
?tprop2 dqm:hasURI ?tpropreal2 .&lt;br /&gt;
  BIND (IRI(str(?tpropreal2)) AS ?tpropURI2) .&lt;br /&gt;
 ?dqr dqm:referenceClass ?trefclass . &lt;br /&gt;
 ?trefclass dqm:hasURI ?trefclassreal .&lt;br /&gt;
 BIND (IRI(str(?trefclassreal)) AS ?trefclassURI) .&lt;br /&gt;
?dqr dqm:referenceProperty1 ?trefprop1 .&lt;br /&gt;
?trefprop1 dqm:hasURI ?trefpropreal1 .&lt;br /&gt;
 BIND (IRI(str(?trefpropreal1)) AS ?trefpropURI1) .&lt;br /&gt;
 ?dqr dqm:referenceProperty2 ?trefprop2 .&lt;br /&gt;
?trefprop2 dqm:hasURI ?trefpropreal2 .&lt;br /&gt;
BIND (IRI(str(?trefpropreal2)) AS ?trefpropURI2) .&lt;br /&gt;
?i a ?tclassURI .&lt;br /&gt;
?i ?tpropURI1 ?value1 .&lt;br /&gt;
?i ?tpropURI2 ?value2 .&lt;br /&gt;
BIND(STRDT(str(?value1),xsd:string) AS ?value11 ) &lt;br /&gt;
BIND(STRDT(str(?value2),xsd:string) AS ?value12 ) &lt;br /&gt;
NOT EXISTS{ &lt;br /&gt;
?i2 a ?trefclassURI .&lt;br /&gt;
 ?i2 ?trefpropURI1 ?value11 .&lt;br /&gt;
 ?i2 ?trefpropURI2 ?value12 .&lt;br /&gt;
 }&lt;br /&gt;
}		&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Quality_Perception_in_Information_Systems</id>
		<title>Quality Perception in Information Systems</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Quality_Perception_in_Information_Systems"/>
				<updated>2011-10-27T17:01:14Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The quality of information is usually perceived by accessing multiple objects, namely&lt;br /&gt;
* Hardware (e.g. a computer),&lt;br /&gt;
* Application (e.g. query software, web browsers, search engines, etc.),&lt;br /&gt;
* Schema / Ontology (i.e. the structure in which the data is stored), and&lt;br /&gt;
* Data itself&lt;br /&gt;
&lt;br /&gt;
[[Image:Perception_objects.png|300px|center]]&lt;br /&gt;
&lt;br /&gt;
In order to find the root cause of information quality problems, it is important to be aware about the above layers. E.g. performace issues regarding data access may often be referred to insufficient configuration of the application or lack of hardware performance.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
What is [[Data Quality]]&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Monitoring_Reports_(DEPRECATED)</id>
		<title>Data Quality Monitoring Reports (DEPRECATED)</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Monitoring_Reports_(DEPRECATED)"/>
				<updated>2011-10-20T20:56:03Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: moved Data Quality Monitoring Reports to Data Quality Monitoring Reports (DEPRECATED)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;This site is currently under construction! In fact, many of these queries won't work since they depend on a different release of the DQM-Vocabulary&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
On this page you find [[Wikipedia:SPARQL|SPARQL]] queries that can be used to generate reports with instances that do not conform to the specified data requirements. Before you can use these queries you need to create data quality rules with the help of the [http://purl.org/dqm-vocabulary/v1/dqm DQM-Vocabulary]. The queries on this page only use elements of the dqm-voabulary so that they work for any datasets as long as the data requirements are specified with the [http://purl.org/dqm-vocabulary/v1/dqm DQM-Vocabulary].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Completeness Reports ==&lt;br /&gt;
=== Conditional Value Rule ===&lt;br /&gt;
'''Addressed DQ-Problems:''' Missing Values&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?i ?condvalue&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a ?ConditionalValueRule .&lt;br /&gt;
    ?dqr dqm:testedProperty ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (smf:buildURI(?tpropreal) AS ?tpropURI) .&lt;br /&gt;
    BIND (smf:buildURI(?tclassreal) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?dqr dqm:hasCondition ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop .&lt;br /&gt;
    ?cprop dqm:hasURI ?cpropreal .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue .&lt;br /&gt;
    BIND (smf:buildURI(?cpropreal) AS ?cpropURI) .&lt;br /&gt;
    ?i ?cpropURI ?value .&lt;br /&gt;
    FILTER (str(?value) = str(?condvalue)) .&lt;br /&gt;
    ?i ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditional Property Rule ===&lt;br /&gt;
'''Addressed DQ-Problems:''' Missing Conceptual Elements&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i ?condvalue&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ConditionalPropertyRule .&lt;br /&gt;
    ?dqr dqm:testedProperty ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (smf:buildURI(?tpropreal) AS ?tpropURI) .&lt;br /&gt;
    BIND (smf:buildURI(?tclassreal) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?dqr dqm:hasCondition ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop .&lt;br /&gt;
    ?cprop dqm:hasURI ?cpropreal .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue .&lt;br /&gt;
    BIND (smf:buildURI(?cpropreal) AS ?cpropURI) .&lt;br /&gt;
    ?i ?cpropURI ?value .&lt;br /&gt;
    FILTER (str(?value) = str(?condvalue)) .&lt;br /&gt;
    NOT EXISTS {&lt;br /&gt;
        ?i ?tpropURI ?mandatoryvalue .&lt;br /&gt;
    } .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Missing Value Rule ===&lt;br /&gt;
'''Addressed DQ-Problems:''' Missing Values&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:MissingValueRule .&lt;br /&gt;
    ?dqr dqm:testedProperty ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (smf:buildURI(?tpropreal) AS ?tpropURI) .&lt;br /&gt;
    BIND (smf:buildURI(?tclassreal) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Missing Property Rule ===&lt;br /&gt;
'''Addressed DQ-Problems:''' Missing Conceptual Elements&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:MissingPropertyRule .&lt;br /&gt;
    ?dqr dqm:testedProperty ?tprop .&lt;br /&gt;
	?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (smf:buildURI(?tpropreal) AS ?tpropURI) .&lt;br /&gt;
    BIND (smf:buildURI(?tclassreal) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
NOT EXISTS{&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Syntactical Accuracy Reports ==&lt;br /&gt;
=== Legal Value Rule ===&lt;br /&gt;
'''Addressed DQ-Problems:''' Invalid Characters, Character Alignment Violations, Embedded Values, Meaningless Values, (False Values, Outdated Values, Imprecise Values)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?i ?dqr&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedProperty ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (smf:buildURI(?tpropreal) AS ?tpropURI) .&lt;br /&gt;
    BIND (smf:buildURI(?tclassreal) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (smf:buildURI(?rpropvalue) AS ?rpropURI) .&lt;br /&gt;
    BIND (smf:buildURI(?rclassvalue) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?s2 a ?rclassURI .&lt;br /&gt;
        ?s2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Legal Value Range Rule ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedProperty ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (smf:buildURI(?tpropreal) AS ?tpropURI) .&lt;br /&gt;
    BIND (smf:buildURI(?tclassreal) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (smf:cast(?value, xsd:float) &amp;gt; ?upperLimit || smf:cast(?value, xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Syntax Rule ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?regex ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedProperty ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (smf:buildURI(?tpropreal) AS ?tpropURI) .&lt;br /&gt;
    BIND (smf:buildURI(?tclassreal) AS ?tclassURI) .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?i a ?tclassURI .&lt;br /&gt;
      ?i ?tpropURI ?value .&lt;br /&gt;
}&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conditional Syntax Rule ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?regex ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ConditionalSyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedProperty ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop .&lt;br /&gt;
    ?cprop dqm:hasURI ?cpropreal .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue .&lt;br /&gt;
    BIND (smf:buildURI(?tpropreal) AS ?tpropURI) .&lt;br /&gt;
    BIND (smf:buildURI(?tclassreal) AS ?tclassURI) .&lt;br /&gt;
    BIND (smf:buildURI(?cpropreal) AS ?cpropURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI ?condvalueplain .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?condvalue) = str(?condvalueplain) &amp;amp;&amp;amp; !regex(str(?value), ?regex)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Semantic Accuracy Reports ==&lt;br /&gt;
=== Functional Dependency Rule (2 AND Conditions) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i ?dvaluereal ?value&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:FunctionalDependencyRule .&lt;br /&gt;
    ?dqr dqm:testedProperty ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    ?cond1 dqm:and ?cond2 .&lt;br /&gt;
    ?cond2 dqm:conditionalProperty ?cprop2 .&lt;br /&gt;
    ?cprop2 dqm:hasURI ?cpropreal2 .&lt;br /&gt;
    ?cond2 dqm:equals ?condvalue2 .&lt;br /&gt;
    BIND (smf:buildURI(?tpropreal) AS ?tpropURI) .&lt;br /&gt;
    BIND (smf:buildURI(?tclassreal) AS ?tclassURI) .&lt;br /&gt;
    BIND (smf:buildURI(?cpropreal1) AS ?cpropURI1) .&lt;br /&gt;
    BIND (smf:buildURI(?cpropreal2) AS ?cpropURI2) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?cpropURI2 ?condvalue2 .&lt;br /&gt;
    ?dqr dqm:hasDependentValue ?dvalue .&lt;br /&gt;
    ?dvalue dqm:equals ?dvaluereal .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvaluereal) != str(?value)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Uniqueness Reports ==&lt;br /&gt;
=== Duplicate Instance Rule ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:DuplicateInstanceRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .    &lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    ?i2 ?tpropURI ?value2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; str(?value) = str(?value2))&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?i&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Timeliness Reports ==&lt;br /&gt;
=== Expiry Rule ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i ?expiry ?today&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty ?tprop .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .    &lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    LET(?today:=afn:now()) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Update Rule ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i ?timestamp&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .    &lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    LET(?expectedUpdate:=dqf:requiredTimestamp(?duration))&lt;br /&gt;
    FILTER(?expectedUpdate&amp;gt;?timestamp)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Monitoring_Reports</id>
		<title>Data Quality Monitoring Reports</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Monitoring_Reports"/>
				<updated>2011-10-20T20:50:53Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;This site is currently under construction!&amp;lt;/span&amp;gt;'''&amp;lt;br /&amp;gt;&lt;br /&gt;
Problem reports are an excellent instrument to quickly identify instances with requirement violations.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
With the DQM-Vocabulary you can easily create problem reports. All you need is a SPARQL-Endpoint that supports [http://www.w3.org/TR/sparql11-query/ SPARQL 1.1] or SPARQL extensions that cover datatype conversion and conversion of strings to [[Wikipedia:URI|URIs]].&lt;br /&gt;
Before you can automatically analyze your data for requirement violations, you need to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
* [[Create Data Requirements#Define Tested Elements|Declare the elements of your ontology that shall be used in the DQM-Vocabulary]]&lt;br /&gt;
* [[Create Data Requirements]]&lt;br /&gt;
&lt;br /&gt;
==Data Requirement Violation Reports with SPARQL==&lt;br /&gt;
&lt;br /&gt;
Each type of data requirement has different problem reports, since the nature of data requirements differs. Moreover, the actual SPARQL query you can use depends on the design option you have chosen to make your ontology elements an instance of [[dqm:TestedClass]] and [[dqm:TestedProperty]] (See [[Create Data Requirements#Define Tested Elements]] for an explanation). In the following you find several SPARQL queries that make use of your data requirements to identify class instances with requirement violations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 1.1: Missing Properties / Values (OWL Full Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances of a certain class that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL Full Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with missing values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    {    &lt;br /&gt;
        ?i a ?tclass .&lt;br /&gt;
        NOT EXISTS{&lt;br /&gt;
           ?i ?tprop ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?i a ?tclass .&lt;br /&gt;
        ?i ?tprop &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 1: Property Completeness Rule |Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 1.2: Missing Properties / Values (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with missing values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?i a ?tclassURI .&lt;br /&gt;
        NOT EXISTS{&lt;br /&gt;
           ?i ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?i a ?tclassURI .&lt;br /&gt;
        ?i ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 1: Property Completeness Rule|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: Conditional Missing Properties / Values (1 Condition, OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances in a subset of a certain class that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All conditional property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Instances with missing values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i ?condvalue&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ConditionalPropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop .&lt;br /&gt;
    ?cprop dqm:hasURI ?cpropreal .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal)) AS ?cpropURI) .&lt;br /&gt;
    {&lt;br /&gt;
       ?i a ?tclassURI .&lt;br /&gt;
       ?i ?cpropURI ?value &lt;br /&gt;
       NOT EXISTS{&lt;br /&gt;
          ?i ?tpropURI ?value1 .&lt;br /&gt;
      }&lt;br /&gt;
    }UNION{ &lt;br /&gt;
       ?i a ?tclassURI .&lt;br /&gt;
       ?i ?cpropURI ?value .&lt;br /&gt;
       ?i ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
    FILTER (str(?value) = str(?condvalue)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 2: Conditional Property Completeness Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 3: Syntax Violations (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances of a certain class with property values that violate a syntax rule.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All syntax rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with property values that have syntax violations&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 3: Syntax Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 4: Conditional Syntax Violations (1 Condition, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all syntax violations of property values in a subset of a certain class.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All conditional syntax rules(in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances of the subset of the class that have syntax violations.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ConditionalSyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop .&lt;br /&gt;
    ?cprop dqm:hasURI ?cpropreal .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal)) AS ?cpropURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI ?condvalueplain .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?condvalue) = str(?condvalueplain) &amp;amp;&amp;amp; !regex(str(?value), ?regex)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 4: Conditional Syntax Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 5: Out of Range Values (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that have property values out of a specified range.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value range rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with out of range values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (STRDT(str(?value), xsd:float) &amp;gt; ?upperLimit || &lt;br /&gt;
    STRDT(str(?value), xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 5: Legal Value Range Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 6: Illegal Values (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that have illegal property values, i.e. values that are not listed in the trusted reference property.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value rules (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with values not listed in the trusted reference.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty1 ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (IRI(str(?rpropvalue)) AS ?rpropURI) .&lt;br /&gt;
    BIND (IRI(str(?rclassvalue)) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?i2 a ?rclassURI .&lt;br /&gt;
        ?i2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 6: Legal Value Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 7: Uniqueness Violations (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with property values that are not unique although they should.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All unique value rules (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with non-unique values of property that must have unique values for each instance.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?uniqueValue1 .&lt;br /&gt;
    ?i2 ?tpropURI ?uniqueValue2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; (str(?uniqueValue1) = str(?uniqueValue2)))&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?i&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 7: Unique Value Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 8: Functional Dependency Violations (1 Condition, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with inconsistent property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependency value rules with 1 condition (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with inconsistent property values.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i ?dvalue ?value&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 8: Functional Dependency Value Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 9: Functional Dependency Violations (2 Conditions, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with inconsistent property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependency value rules with 2 conditions (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with inconsistent property values.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i &lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
    ?cond2 dqm:conditionalProperty ?cprop2 .&lt;br /&gt;
    ?cprop2 dqm:hasURI ?cpropreal2 .&lt;br /&gt;
    ?cond2 dqm:equals ?condvalue2 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal2)) AS ?cpropURI2) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?cpropURI2 ?condvalue2 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 9: Functional Dependency Value Rule (2 Conditions, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: Expired Values (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all outdated instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All expiry rules (in OWL DL Design) and validity date of instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with that are not valid anymore.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND ((now()) AS ?today)&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 10: Expiry Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 11: Not Updated Values (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all outdated instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All update rules (in OWL DL Design) and timestamps of instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with that are potentially outdated.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND((dqf:requiredTimestamp(?duration)) AS ?reqTimestamp) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    FILTER(?reqTimestamp&amp;gt;?timestamp)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 11: Update Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Monitoring_Reports</id>
		<title>Data Quality Monitoring Reports</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Data_Quality_Monitoring_Reports"/>
				<updated>2011-10-20T20:40:51Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;This site is currently under construction!&amp;lt;/span&amp;gt;'''&amp;lt;br /&amp;gt;&lt;br /&gt;
Problem reports are an excellent instrument to quickly identify instances with requirement violations.&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
With the DQM-Vocabulary you can easily create problem reports. All you need is a SPARQL-Endpoint that supports [http://www.w3.org/TR/sparql11-query/ SPARQL 1.1] or SPARQL extensions that cover datatype conversion and conversion of strings to [[Wikipedia:URI|URIs]].&lt;br /&gt;
Before you can automatically analyze your data for requirement violations, you need to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
* [[Create Data Requirements#Define Tested Elements|Declare the elements of your ontology that shall be used in the DQM-Vocabulary]]&lt;br /&gt;
* [[Create Data Requirements]]&lt;br /&gt;
&lt;br /&gt;
==Data Requirement Violation Reports with SPARQL==&lt;br /&gt;
&lt;br /&gt;
Each type of data requirement has different problem reports, since the nature of data requirements differs. Moreover, the actual SPARQL query you can use depends on the design option you have chosen to make your ontology elements an instance of [[dqm:TestedClass]] and [[dqm:TestedProperty]] (See [[Create Data Requirements#Define Tested Elements]] for an explanation). In the following you find several SPARQL queries that make use of your data requirements to identify class instances with requirement violations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 1.1: Property Completeness Violations (OWL Full Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances of a certain class that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL Full Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with missing values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    {    &lt;br /&gt;
        ?i a ?tclass .&lt;br /&gt;
        NOT EXISTS{&lt;br /&gt;
           ?i ?tprop ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?i a ?tclass .&lt;br /&gt;
        ?i ?tprop &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 1: Property Completeness Rule |Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 1.2: Property Completeness Violations (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with missing values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:PropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    {    &lt;br /&gt;
        ?i a ?tclassURI .&lt;br /&gt;
        NOT EXISTS{&lt;br /&gt;
           ?i ?tpropURI ?value .&lt;br /&gt;
        }&lt;br /&gt;
    }UNION{&lt;br /&gt;
        ?i a ?tclassURI .&lt;br /&gt;
        ?i ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 1: Property Completeness Rule|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 2: Conditional Property Completeness Violations (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances in a subset of a certain class that miss a property or a property value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All conditional property completeness rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||Instances with missing values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i ?condvalue&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ConditionalPropertyCompletenessRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?dqr dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop .&lt;br /&gt;
    ?cprop dqm:hasURI ?cpropreal .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal)) AS ?cpropURI) .&lt;br /&gt;
    {&lt;br /&gt;
       ?i a ?tclassURI .&lt;br /&gt;
       ?i ?cpropURI ?value &lt;br /&gt;
       NOT EXISTS{&lt;br /&gt;
          ?i ?tpropURI ?value1 .&lt;br /&gt;
      }&lt;br /&gt;
    }UNION{ &lt;br /&gt;
       ?i a ?tclassURI .&lt;br /&gt;
       ?i ?cpropURI ?value .&lt;br /&gt;
       ?i ?tpropURI &amp;quot;&amp;quot; .&lt;br /&gt;
    }&lt;br /&gt;
    FILTER (str(?value) = str(?condvalue)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 2: Conditional Property Completeness Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 3: Syntax Rule Violations (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances of a certain class with property values that violate a syntax rule.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All syntax rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with property values that have syntax violations&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:SyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (!regex(str(?value), ?regex)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Create Data Requirements#Example 3: Syntax Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 4: Conditional Syntax Rule Violations (1 Condition, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all syntax violations of property values in a subset of a certain class.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All conditional syntax rules(in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances of the subset of the class that have syntax violations.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ConditionalSyntaxRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:regex ?regex .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop .&lt;br /&gt;
    ?cprop dqm:hasURI ?cpropreal .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal)) AS ?cpropURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI ?condvalueplain .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?condvalue) = str(?condvalueplain) &amp;amp;&amp;amp; !regex(str(?value), ?regex)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 4: Conditional Syntax Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 5: Legal Value Range Rule (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that have property values out of a specified range.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value range rules (in OWL DL Design)&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with out of range values&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:LegalValueRangeRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:upperLimit ?upperLimit .&lt;br /&gt;
    }&lt;br /&gt;
    OPTIONAL{&lt;br /&gt;
      ?dqr dqm:lowerLimit ?lowerLimit .&lt;br /&gt;
    }&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (STRDT(str(?value), xsd:float) &amp;gt; ?upperLimit || &lt;br /&gt;
    STRDT(str(?value), xsd:float) &amp;lt; ?lowerLimit) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 5: Legal Value Range Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 6: Legal Value Rule (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances that have illegal property values, i.e. values that are not listed in the trusted reference property.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All legal value rules (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with values not listed in the trusted reference.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:LegalValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?dqr dqm:referenceClass ?rclass .&lt;br /&gt;
    ?dqr dqm:referenceProperty1 ?rprop .&lt;br /&gt;
    ?rclass dqm:hasURI ?rclassvalue .&lt;br /&gt;
    ?rprop dqm:hasURI ?rpropvalue .&lt;br /&gt;
    BIND (IRI(str(?rpropvalue)) AS ?rpropURI) .&lt;br /&gt;
    BIND (IRI(str(?rclassvalue)) AS ?rclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    OPTIONAL {&lt;br /&gt;
        ?i2 a ?rclassURI .&lt;br /&gt;
        ?i2 ?rpropURI ?value1 .&lt;br /&gt;
        FILTER (str(?value1) = str(?value)) .&lt;br /&gt;
    } .&lt;br /&gt;
    FILTER (!bound(?value1)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 6: Legal Value Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 7: Unique Value Rule (OWL DL Design)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with property values that are not unique although they should.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All unique value rules (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with non-unique values of property that must have unique values for each instance.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:UniqueValueRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?uniqueValue1 .&lt;br /&gt;
    ?i2 ?tpropURI ?uniqueValue2 .&lt;br /&gt;
    FILTER(?i!=?i2 &amp;amp;&amp;amp; (str(?uniqueValue1) = str(?uniqueValue2)))&lt;br /&gt;
}&lt;br /&gt;
GROUP BY ?dqr ?i&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 7: Unique Value Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 8: Functional Dependency Value Rule (1 Condition, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with inconsistent property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependency value rules with 1 condition (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with inconsistent property values.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i ?dvalue ?value&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 8: Functional Dependency Value Rule (1 Condition, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 9: Functional Dependency Value Rule (2 Conditions, OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all instances with inconsistent property values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All functional dependency value rules with 2 conditions (in OWL DL Design).&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with inconsistent property values.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i &lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:FuncDepValueRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?dqr dqm:equals ?dvalue .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    ?dqr dqm:hasCondition1 ?cond1 .&lt;br /&gt;
    ?cond1 dqm:conditionalProperty ?cprop1 .&lt;br /&gt;
    ?cprop1 dqm:hasURI ?cpropreal1 .&lt;br /&gt;
    ?cond1 dqm:equals ?condvalue1 .&lt;br /&gt;
    ?dqr dqm:hasCondition2 ?cond2 .&lt;br /&gt;
    ?cond2 dqm:conditionalProperty ?cprop2 .&lt;br /&gt;
    ?cprop2 dqm:hasURI ?cpropreal2 .&lt;br /&gt;
    ?cond2 dqm:equals ?condvalue2 .&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition3 ?cond3 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition4 ?cond4 .&lt;br /&gt;
  }&lt;br /&gt;
  MINUS{&lt;br /&gt;
   ?dqr dqm:hasCondition5 ?cond5 .&lt;br /&gt;
  }&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal1)) AS ?cpropURI1) .&lt;br /&gt;
    BIND (IRI(str(?cpropreal2)) AS ?cpropURI2) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?cpropURI1 ?condvalue1 .&lt;br /&gt;
    ?i ?cpropURI2 ?condvalue2 .&lt;br /&gt;
    ?i ?tpropURI ?value .&lt;br /&gt;
    FILTER (str(?dvalue) != str(?value)) .&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 9: Functional Dependency Value Rule (2 Conditions, OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
===Example 10: Expiry Rule (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all outdated instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All expiry rules (in OWL DL Design) and validity date of instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with that are not valid anymore.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:ExpiryRule .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass . &lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND ((now()) AS ?today)&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?expiry .&lt;br /&gt;
    FILTER(?expiry&amp;lt;?today)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 10: Expiry Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Example 11: Update Rule (OWL DL Design)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Scenario:'''||Find all outdated instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Input:'''||All update rules (in OWL DL Design) and timestamps of instances.&lt;br /&gt;
|-&lt;br /&gt;
|'''Output:'''||All instances with that are potentially outdated.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sparql&amp;quot;&amp;gt;&lt;br /&gt;
SELECT ?dqr ?i&lt;br /&gt;
WHERE {&lt;br /&gt;
    ?dqr a dqm:UpdateRule .&lt;br /&gt;
    ?dqr dqm:testedClass ?tclass .&lt;br /&gt;
    ?dqr dqm:testedProperty1 ?tprop .&lt;br /&gt;
    ?dqr dqm:expectedUpdateInterval ?duration .&lt;br /&gt;
    ?tclass dqm:hasURI ?tclassreal .&lt;br /&gt;
    ?tprop dqm:hasURI ?tpropreal .&lt;br /&gt;
    BIND (IRI(str(?tpropreal)) AS ?tpropURI) .&lt;br /&gt;
    BIND (IRI(str(?tclassreal)) AS ?tclassURI) .&lt;br /&gt;
    BIND((dqf:requiredTimestamp(?duration)) AS ?reqTimestamp) .&lt;br /&gt;
    ?i a ?tclassURI .&lt;br /&gt;
    ?i ?tpropURI ?timestamp .&lt;br /&gt;
    FILTER(?reqTimestamp&amp;gt;?timestamp)&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Create Data Requirements#Example 11: Update Rule (OWL DL)|Click here to learn how to define a data requirement for this report]]&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Create_Data_Requirements</id>
		<title>Create Data Requirements</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Create_Data_Requirements"/>
				<updated>2011-10-20T20:40:26Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Example 11: Expiry Rule (OWL DL) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;This site is currently under construction!&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== What are Data Requirements? ==&lt;br /&gt;
&lt;br /&gt;
Data requirements are prescribed directives or consensual agreements that define the content and/or structure that constitute high quality data instances and values. Data requirements can thereby be stated by several different individuals or groups of individuals. Moreover, data requirments may also be based on laws, standards, or other directives. They may be agreed upon or contrary to each other.&lt;br /&gt;
&lt;br /&gt;
However, data requirements are required as a prerequisite to measure data quality. Hence, they serve as a benchmark that defines the desired state of data. In the following, we describe how you can express your data requirements via the DQM-Vocabulary.&lt;br /&gt;
&lt;br /&gt;
== Types of Data Requirements ==&lt;br /&gt;
&lt;br /&gt;
Data requirements usually refer to different data items. When we look at a table we usually have at least four types of data items, (1) columns, (2) rows, (3) schemata, and (4) the table/spreadsheet itself. &lt;br /&gt;
&lt;br /&gt;
[[File:Terminology.png|500px|Table to illustrate used terminology]]&lt;br /&gt;
&lt;br /&gt;
In Semantic Web environments, we can compare columns to properties, rows to instances, schemata to ontologies, and tables to classes. Data requirements can usually be related to one of these elements. In particular, there are &lt;br /&gt;
# data requirements related to the values of a single property (column)&lt;br /&gt;
# data requirements related to the values of multiple properties within an instance (multiple columns in a row)&lt;br /&gt;
# data requirements related to the instances of a whole class (table)&lt;br /&gt;
# data requirements related to the ontology elements (schema)&lt;br /&gt;
&lt;br /&gt;
With the DQM-Vocabulary, you can model the first three types of requirements. Schema/ontology requirements are currently not part of the vocabulary, but may be added in future releases. In the following, we explain how Property-, Multi-Property-, Class-, and Custom-Requirements can be modelled with the current version of the DQM-Vocabulary.&lt;br /&gt;
&lt;br /&gt;
==Define Tested Elements==&lt;br /&gt;
Before you can use your data with the DQM-Vocabulary, you have to declare the elements of your ontology that shall be used in the DQM-Vocabulary. You have two options to do this with impact on decidablility of potential reasoning with your knowledge base:&lt;br /&gt;
&lt;br /&gt;
=== Design Option 1: Classes and Properties as Instances (OWL Full) ===&lt;br /&gt;
Classes and properties that shall be tested for data requirement violations are defined as direct instances of the classes [[dqm:TestedClass]] or [[dqm:TestedProperty]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:MyClass a dqm:TestedClass&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:MyProperty a dqm:TestedProperty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;'''Attention:'''&amp;lt;/span&amp;gt; This will make your knowledge base OWL Full which is potentially not useful if you plan to use reasoning.&lt;br /&gt;
&lt;br /&gt;
=== Design Option 2: Mapping of Classes and Properties to new URIs (OWL DL) ===&lt;br /&gt;
Classes and properties that shall be tested for data requirement violations are mapped to new instances of the classes [[dqm:TestedClass]] and [[dqm:TestedProperty]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Class_1 a dqm:TestedClass&lt;br /&gt;
                dqm:hasURI &amp;quot;http://www.example.org/MyClass&amp;quot;^^xsd:anyURI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Property_1 a dqm:TestedProperty&lt;br /&gt;
                dqm:hasURI &amp;quot;http://www.example.org/MyProperty&amp;quot;^^xsd:anyURI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sample Dataset used in Examples ==&lt;br /&gt;
The following examples use classes and properties from our sample dataset as [[dqm:TestedClass]] and [[dqm:TestedProperties]]. Requirements specified in OWL DL will use the mapped instances, while requirements specified in OWL Full will use the original classes and properties. The data set contains the following classes:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Original Class!!Mapped Instance&lt;br /&gt;
|-&lt;br /&gt;
|foo:Location||foo:Class_Location&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
...with the following datatype properties:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Original Property !! Mapped Instance&lt;br /&gt;
|-&lt;br /&gt;
|foo:LOCID ||foo:Prop_Location_ID&lt;br /&gt;
|-&lt;br /&gt;
|foo:STREET||foo:Prop_Location_Street&lt;br /&gt;
|-&lt;br /&gt;
|foo:STREETNO||foo:Prop_Location_Streetno&lt;br /&gt;
|-&lt;br /&gt;
|foo:ZIP||foo:Prop_Location_ZIP&lt;br /&gt;
|-&lt;br /&gt;
|foo:CITY||foo:Prop_Location_City&lt;br /&gt;
|-&lt;br /&gt;
|foo:COUNTRY||foo:Prop_Location_Country&lt;br /&gt;
|-&lt;br /&gt;
|foo:STATE||foo:Prop_Location_State&lt;br /&gt;
|-&lt;br /&gt;
|foo:validThrough||foo:Prop_validThrough&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to apply the example to your own data, you need to exchange the sample classes and properties used in the data requirements by your own.&lt;br /&gt;
&lt;br /&gt;
==Syntax Of Examples==&lt;br /&gt;
&lt;br /&gt;
The following examples show instance data in [http://www.w3.org/TeamSubmission/turtle/ Turtle/Notation 3 syntax].&lt;br /&gt;
&lt;br /&gt;
== Examples of Data Requirements ==&lt;br /&gt;
&lt;br /&gt;
===Example 1: Property Completeness Rule===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a specific property and/or its values must exist for all instances of a specific class.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:COUNTRY must exist and have a value in all instances of the class foo:Location.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:MissingPropertyAndValue]] [[dqm:MissingProperty]] [[dqm:MissingValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyCompleteness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you defined your data elements in OWL Full ([[#Option 1: Classes and Properties as Instances (OWL Full)|Option 1]]), then you can simply use the URIs of your ontology in the definition of the Property Completeness Rule as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Definition in OWL Full'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:PropertyCompletenessRule_1&lt;br /&gt;
      a       dqm:PropertyCompletenessRule ;&lt;br /&gt;
      dqm:testedClass http://www.example.org/MyClass ;&lt;br /&gt;
      dqm:testedProperty1 http://www.example.org/MyProperty ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 1.1: Property Completeness Violations (OWL Full Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The property [[dqm:requiredProperty]] specifies that the property &amp;quot;MyProperty&amp;quot; must exist in each instance. The property [[dqm:requiredValue]] specifies that a value must exist for property &amp;quot;MyProperty&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you mapped your own ontology elements to new URIs ([[#Option 2: Mapping of Classes and Properties to new URIs (OWL DL)|Option 2]], OWL DL), then the following example will help you to define a Property Completeness Rule:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Definition in OWL-DL'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:PropertyCompletenessRule_1&lt;br /&gt;
      a       dqm:PropertyCompletenessRule ;&lt;br /&gt;
      dqm:testedClass foo:Class_1 ;&lt;br /&gt;
      dqm:testedProperty1 foo:Property_1 ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 1.2: Property Completeness Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The property [[dqm:requiredProperty]] specifies that the property &amp;quot;MyProperty&amp;quot; which is mapped to &amp;quot;foo:Property_1&amp;quot; must exist in each instance of the class &amp;quot;MyClass&amp;quot; which is mapped to &amp;quot;foo:Class_1&amp;quot;. The property [[dqm:requiredValue]] specifies that also a value must exist for property &amp;quot;foo:Property_1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Example 2: Conditional Property Completeness Rule (1 Condition, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a specific property and/or its values must exist if another property obtains a specific value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:STATE must exist and have a value in all instances of the class foo:Location that have value &amp;quot;USA&amp;quot; for the property foo:COUNTRY.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:MissingPropertyAndValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyCompleteness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To define this data requirement, you must perform the following two steps:&lt;br /&gt;
&lt;br /&gt;
'''1. Define the Condition'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Condition_USA&lt;br /&gt;
      a       dqm:Condition ;&lt;br /&gt;
      rdfs:label &amp;quot;Condition USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:conditionalProperty foo:Prop_Location_Country ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2. Define the Conditional Property Completeness Rule'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ConditionalPropertyCompletenessRule_State&lt;br /&gt;
      a       dqm:ConditionalPropertyCompletenessRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Conditional property completeness rule State&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 2: Conditional Property Completeness Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 3: Syntax Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a specific property must obtain a specific syntax.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:ZIP must contain values with exactly five digits.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:SyntaxViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify syntax requirements by creating an instance of the class [[dqm:SyntaxRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:SyntaxRule_ZIP&lt;br /&gt;
      a       dqm:SyntaxRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Syntax rule ZIP&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:regex &amp;quot;^[0-9]{5}$&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Property_ZIP .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Generate_Problem_Reports#Example 3: Syntax Rule Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 4:  Conditional Syntax Rule (1 Condition, OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a specific property must obtain a specific syntax if another property obtains a specific value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:STATE must contain a value with two letters if the property foo:COUNTRY has the value &amp;quot;USA&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:SyntaxViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify a conditional syntax rule, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
'''1.Define Condition'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Condition_USA&lt;br /&gt;
      a       dqm:Condition ;&lt;br /&gt;
      rdfs:label &amp;quot;Condition USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:conditionalProperty foo:Prop_Location_Country ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2.Define Conditional Syntax Rule'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ConditionalSyntaxRule_State&lt;br /&gt;
      a       dqm:ConditionalSyntaxRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Conditional syntax rule State&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:regex &amp;quot;^[A-Z]{2}$&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5: Legal Value Range Rule (OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify valid value ranges for properties that hold numeric values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a product data set, the property foo:PRICE can never contain negative values.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutOfRangeValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify a legal value range for a property by adding the following instance data to the class [[dqm:LegalValueRangeRule]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:LegalValueRangeRule_Price&lt;br /&gt;
      a       dqm:LegalValueRangeRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Legal value range rule Price&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:lowerLimit &amp;quot;0.00&amp;quot;^^xsd:float ;&lt;br /&gt;
      dqm:testedClass foo:Class_Product ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Product_Price .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The class [[dqm:LegalValueRangeRule]] has the special properties&lt;br /&gt;
* [[dqm:lowerLimit]]&lt;br /&gt;
* [[dqm:upperLimit]]&lt;br /&gt;
&lt;br /&gt;
to specify the lowest and/or highest allowed value.&lt;br /&gt;
&lt;br /&gt;
===Example 6: Legal Value Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify a reference property that holds the allowed values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:COUNTRY can only contain values of the trusted property foo:legalValue in the trusted class foo:LegalValueCountry.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:IllegalValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify legal values for a specific property, you need to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Create a reference data set or use an existing data set that holds the legal values &lt;br /&gt;
# Specify the class and property which hold the legal values as [[dqm:TrustedClass]] and [[dqm:TrustedProperty]]&lt;br /&gt;
# Create an instance of [[dqm:LegalValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:LegalValueRule_Country&lt;br /&gt;
      a       dqm:LegalValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Legal value rule Country&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:referenceClass foo:TrustedClass_LegalValueCountry ;&lt;br /&gt;
      dqm:referenceProperty1 foo:TrustedProperty_LegalValue ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_Country .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 7: Unique Value Rule (OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a property must be unique.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:LOCID of class foo:Location must only contain unique values.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:UniquenessViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyUniqueness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify that values of a property must be unique by creating an instance of the class [[dqm:UniqueValueRule]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:UniqueValueRule_LOCID&lt;br /&gt;
      a       dqm:UniqueValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Unique value rule LOCID&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_ID .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 8: Functional Dependency Value Rule (1 Condition, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a value of one property must obtain a specific value if a second property has a certain value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In an address data set, the city name &amp;quot;New York&amp;quot; must always have the value &amp;quot;USA&amp;quot; for the property foo:COUNTRY.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:FunctionalDependencyViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SemanticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify the dependency between two property values, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Define a condition under which a specific value is always required. &lt;br /&gt;
# Create an instance of the class [[dqm:FuncDepValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:FuncDepValueRule_1&lt;br /&gt;
      a       dqm:FuncDepValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Func dep value rule 1&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_New_York ;&lt;br /&gt;
      dqm:reqDescription &amp;quot;If the city value is \&amp;quot;New York\&amp;quot; then the country must be     &lt;br /&gt;
                         \&amp;quot;USA\&amp;quot;.&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_Country .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 9: Functional Dependency Value Rule (2 Conditions, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a value of one property must obtain a specific value if a second and third property have specific values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In an address data set, the city &amp;quot;New York&amp;quot; in the country &amp;quot;USA&amp;quot; must always have the value &amp;quot;NY&amp;quot; for the property foo:STATE.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:FunctionalDependencyViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SemanticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify the dependency between three property values, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Define both conditions under which a specific value is always required. &lt;br /&gt;
# Create an instance of the class [[dqm:FuncDepValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:FuncDepValueRule_2&lt;br /&gt;
      a       dqm:FuncDepValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Func dep value rule 2&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:equals &amp;quot;NY&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:hasCondition2 foo:Condition_New_York ;&lt;br /&gt;
      dqm:reqDescription &amp;quot;If the city value is \&amp;quot;New York\&amp;quot; and the country value is &lt;br /&gt;
                         \&amp;quot;USA\&amp;quot; then the state must be \&amp;quot;NY\&amp;quot;.&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 10: Expiry Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that instances of a specific class expire.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a product data set, the class foo:Product has instances with product offerings that expire on a certain date which is specified via the property foo:validThrough.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutdatedInstance]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:Timeliness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:ClassRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify that instances of a class have an expiry date by creating an instance of class [[dqm:ExpiryRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ExpiryRule_1&lt;br /&gt;
      a       dqm:ExpiryRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Expiry rule 1&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Product ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Product_validThrough .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 11: Update Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that instances of a specific class must be updated within a specified interval.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the class foo:Location has instances with address data that have timestamps of the last update. The instances shall not be elder than 1 year 2 months 3 days 5 hours 20 minutes and 30.123 seconds.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutdatedInstance]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:Timeliness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:ClassRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify a required update interval for instances of a specific property by creating an instance of class [[dqm:UpdateRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:UpdateRule_Location&lt;br /&gt;
      a       dqm:UpdateRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Update rule Location&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:expectedUpdateInterval &amp;quot;P1Y2M3DT5H20M30.123S&amp;quot;^^xsd:duration ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_timestamp .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''NOTE:'''&amp;lt;/span&amp;gt; The tested class must have a property that holds the time of the last update in order to be able to specify this requirement.&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Create_Data_Requirements</id>
		<title>Create Data Requirements</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Create_Data_Requirements"/>
				<updated>2011-10-20T20:34:23Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Example 1: PropertyCompletenessRule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;This site is currently under construction!&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== What are Data Requirements? ==&lt;br /&gt;
&lt;br /&gt;
Data requirements are prescribed directives or consensual agreements that define the content and/or structure that constitute high quality data instances and values. Data requirements can thereby be stated by several different individuals or groups of individuals. Moreover, data requirments may also be based on laws, standards, or other directives. They may be agreed upon or contrary to each other.&lt;br /&gt;
&lt;br /&gt;
However, data requirements are required as a prerequisite to measure data quality. Hence, they serve as a benchmark that defines the desired state of data. In the following, we describe how you can express your data requirements via the DQM-Vocabulary.&lt;br /&gt;
&lt;br /&gt;
== Types of Data Requirements ==&lt;br /&gt;
&lt;br /&gt;
Data requirements usually refer to different data items. When we look at a table we usually have at least four types of data items, (1) columns, (2) rows, (3) schemata, and (4) the table/spreadsheet itself. &lt;br /&gt;
&lt;br /&gt;
[[File:Terminology.png|500px|Table to illustrate used terminology]]&lt;br /&gt;
&lt;br /&gt;
In Semantic Web environments, we can compare columns to properties, rows to instances, schemata to ontologies, and tables to classes. Data requirements can usually be related to one of these elements. In particular, there are &lt;br /&gt;
# data requirements related to the values of a single property (column)&lt;br /&gt;
# data requirements related to the values of multiple properties within an instance (multiple columns in a row)&lt;br /&gt;
# data requirements related to the instances of a whole class (table)&lt;br /&gt;
# data requirements related to the ontology elements (schema)&lt;br /&gt;
&lt;br /&gt;
With the DQM-Vocabulary, you can model the first three types of requirements. Schema/ontology requirements are currently not part of the vocabulary, but may be added in future releases. In the following, we explain how Property-, Multi-Property-, Class-, and Custom-Requirements can be modelled with the current version of the DQM-Vocabulary.&lt;br /&gt;
&lt;br /&gt;
==Define Tested Elements==&lt;br /&gt;
Before you can use your data with the DQM-Vocabulary, you have to declare the elements of your ontology that shall be used in the DQM-Vocabulary. You have two options to do this with impact on decidablility of potential reasoning with your knowledge base:&lt;br /&gt;
&lt;br /&gt;
=== Design Option 1: Classes and Properties as Instances (OWL Full) ===&lt;br /&gt;
Classes and properties that shall be tested for data requirement violations are defined as direct instances of the classes [[dqm:TestedClass]] or [[dqm:TestedProperty]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:MyClass a dqm:TestedClass&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:MyProperty a dqm:TestedProperty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;'''Attention:'''&amp;lt;/span&amp;gt; This will make your knowledge base OWL Full which is potentially not useful if you plan to use reasoning.&lt;br /&gt;
&lt;br /&gt;
=== Design Option 2: Mapping of Classes and Properties to new URIs (OWL DL) ===&lt;br /&gt;
Classes and properties that shall be tested for data requirement violations are mapped to new instances of the classes [[dqm:TestedClass]] and [[dqm:TestedProperty]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Class_1 a dqm:TestedClass&lt;br /&gt;
                dqm:hasURI &amp;quot;http://www.example.org/MyClass&amp;quot;^^xsd:anyURI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Property_1 a dqm:TestedProperty&lt;br /&gt;
                dqm:hasURI &amp;quot;http://www.example.org/MyProperty&amp;quot;^^xsd:anyURI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sample Dataset used in Examples ==&lt;br /&gt;
The following examples use classes and properties from our sample dataset as [[dqm:TestedClass]] and [[dqm:TestedProperties]]. Requirements specified in OWL DL will use the mapped instances, while requirements specified in OWL Full will use the original classes and properties. The data set contains the following classes:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Original Class!!Mapped Instance&lt;br /&gt;
|-&lt;br /&gt;
|foo:Location||foo:Class_Location&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
...with the following datatype properties:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Original Property !! Mapped Instance&lt;br /&gt;
|-&lt;br /&gt;
|foo:LOCID ||foo:Prop_Location_ID&lt;br /&gt;
|-&lt;br /&gt;
|foo:STREET||foo:Prop_Location_Street&lt;br /&gt;
|-&lt;br /&gt;
|foo:STREETNO||foo:Prop_Location_Streetno&lt;br /&gt;
|-&lt;br /&gt;
|foo:ZIP||foo:Prop_Location_ZIP&lt;br /&gt;
|-&lt;br /&gt;
|foo:CITY||foo:Prop_Location_City&lt;br /&gt;
|-&lt;br /&gt;
|foo:COUNTRY||foo:Prop_Location_Country&lt;br /&gt;
|-&lt;br /&gt;
|foo:STATE||foo:Prop_Location_State&lt;br /&gt;
|-&lt;br /&gt;
|foo:validThrough||foo:Prop_validThrough&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to apply the example to your own data, you need to exchange the sample classes and properties used in the data requirements by your own.&lt;br /&gt;
&lt;br /&gt;
==Syntax Of Examples==&lt;br /&gt;
&lt;br /&gt;
The following examples show instance data in [http://www.w3.org/TeamSubmission/turtle/ Turtle/Notation 3 syntax].&lt;br /&gt;
&lt;br /&gt;
== Examples of Data Requirements ==&lt;br /&gt;
&lt;br /&gt;
===Example 1: Property Completeness Rule===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a specific property and/or its values must exist for all instances of a specific class.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:COUNTRY must exist and have a value in all instances of the class foo:Location.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:MissingPropertyAndValue]] [[dqm:MissingProperty]] [[dqm:MissingValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyCompleteness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you defined your data elements in OWL Full ([[#Option 1: Classes and Properties as Instances (OWL Full)|Option 1]]), then you can simply use the URIs of your ontology in the definition of the Property Completeness Rule as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Definition in OWL Full'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:PropertyCompletenessRule_1&lt;br /&gt;
      a       dqm:PropertyCompletenessRule ;&lt;br /&gt;
      dqm:testedClass http://www.example.org/MyClass ;&lt;br /&gt;
      dqm:testedProperty1 http://www.example.org/MyProperty ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 1.1: Property Completeness Violations (OWL Full Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The property [[dqm:requiredProperty]] specifies that the property &amp;quot;MyProperty&amp;quot; must exist in each instance. The property [[dqm:requiredValue]] specifies that a value must exist for property &amp;quot;MyProperty&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you mapped your own ontology elements to new URIs ([[#Option 2: Mapping of Classes and Properties to new URIs (OWL DL)|Option 2]], OWL DL), then the following example will help you to define a Property Completeness Rule:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Definition in OWL-DL'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:PropertyCompletenessRule_1&lt;br /&gt;
      a       dqm:PropertyCompletenessRule ;&lt;br /&gt;
      dqm:testedClass foo:Class_1 ;&lt;br /&gt;
      dqm:testedProperty1 foo:Property_1 ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 1.2: Property Completeness Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The property [[dqm:requiredProperty]] specifies that the property &amp;quot;MyProperty&amp;quot; which is mapped to &amp;quot;foo:Property_1&amp;quot; must exist in each instance of the class &amp;quot;MyClass&amp;quot; which is mapped to &amp;quot;foo:Class_1&amp;quot;. The property [[dqm:requiredValue]] specifies that also a value must exist for property &amp;quot;foo:Property_1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Example 2: Conditional Property Completeness Rule (1 Condition, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a specific property and/or its values must exist if another property obtains a specific value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:STATE must exist and have a value in all instances of the class foo:Location that have value &amp;quot;USA&amp;quot; for the property foo:COUNTRY.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:MissingPropertyAndValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyCompleteness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To define this data requirement, you must perform the following two steps:&lt;br /&gt;
&lt;br /&gt;
'''1. Define the Condition'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Condition_USA&lt;br /&gt;
      a       dqm:Condition ;&lt;br /&gt;
      rdfs:label &amp;quot;Condition USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:conditionalProperty foo:Prop_Location_Country ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2. Define the Conditional Property Completeness Rule'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ConditionalPropertyCompletenessRule_State&lt;br /&gt;
      a       dqm:ConditionalPropertyCompletenessRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Conditional property completeness rule State&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 2: Conditional Property Completeness Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 3: Syntax Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a specific property must obtain a specific syntax.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:ZIP must contain values with exactly five digits.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:SyntaxViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify syntax requirements by creating an instance of the class [[dqm:SyntaxRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:SyntaxRule_ZIP&lt;br /&gt;
      a       dqm:SyntaxRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Syntax rule ZIP&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:regex &amp;quot;^[0-9]{5}$&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Property_ZIP .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Generate_Problem_Reports#Example 3: Syntax Rule Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 4:  Conditional Syntax Rule (1 Condition, OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a specific property must obtain a specific syntax if another property obtains a specific value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:STATE must contain a value with two letters if the property foo:COUNTRY has the value &amp;quot;USA&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:SyntaxViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify a conditional syntax rule, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
'''1.Define Condition'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Condition_USA&lt;br /&gt;
      a       dqm:Condition ;&lt;br /&gt;
      rdfs:label &amp;quot;Condition USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:conditionalProperty foo:Prop_Location_Country ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2.Define Conditional Syntax Rule'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ConditionalSyntaxRule_State&lt;br /&gt;
      a       dqm:ConditionalSyntaxRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Conditional syntax rule State&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:regex &amp;quot;^[A-Z]{2}$&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5: Legal Value Range Rule (OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify valid value ranges for properties that hold numeric values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a product data set, the property foo:PRICE can never contain negative values.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutOfRangeValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify a legal value range for a property by adding the following instance data to the class [[dqm:LegalValueRangeRule]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:LegalValueRangeRule_Price&lt;br /&gt;
      a       dqm:LegalValueRangeRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Legal value range rule Price&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:lowerLimit &amp;quot;0.00&amp;quot;^^xsd:float ;&lt;br /&gt;
      dqm:testedClass foo:Class_Product ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Product_Price .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The class [[dqm:LegalValueRangeRule]] has the special properties&lt;br /&gt;
* [[dqm:lowerLimit]]&lt;br /&gt;
* [[dqm:upperLimit]]&lt;br /&gt;
&lt;br /&gt;
to specify the lowest and/or highest allowed value.&lt;br /&gt;
&lt;br /&gt;
===Example 6: Legal Value Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify a reference property that holds the allowed values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:COUNTRY can only contain values of the trusted property foo:legalValue in the trusted class foo:LegalValueCountry.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:IllegalValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify legal values for a specific property, you need to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Create a reference data set or use an existing data set that holds the legal values &lt;br /&gt;
# Specify the class and property which hold the legal values as [[dqm:TrustedClass]] and [[dqm:TrustedProperty]]&lt;br /&gt;
# Create an instance of [[dqm:LegalValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:LegalValueRule_Country&lt;br /&gt;
      a       dqm:LegalValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Legal value rule Country&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:referenceClass foo:TrustedClass_LegalValueCountry ;&lt;br /&gt;
      dqm:referenceProperty1 foo:TrustedProperty_LegalValue ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_Country .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 7: Unique Value Rule (OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a property must be unique.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:LOCID of class foo:Location must only contain unique values.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:UniquenessViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyUniqueness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify that values of a property must be unique by creating an instance of the class [[dqm:UniqueValueRule]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:UniqueValueRule_LOCID&lt;br /&gt;
      a       dqm:UniqueValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Unique value rule LOCID&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_ID .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 8: Functional Dependency Value Rule (1 Condition, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a value of one property must obtain a specific value if a second property has a certain value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In an address data set, the city name &amp;quot;New York&amp;quot; must always have the value &amp;quot;USA&amp;quot; for the property foo:COUNTRY.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:FunctionalDependencyViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SemanticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify the dependency between two property values, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Define a condition under which a specific value is always required. &lt;br /&gt;
# Create an instance of the class [[dqm:FuncDepValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:FuncDepValueRule_1&lt;br /&gt;
      a       dqm:FuncDepValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Func dep value rule 1&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_New_York ;&lt;br /&gt;
      dqm:reqDescription &amp;quot;If the city value is \&amp;quot;New York\&amp;quot; then the country must be     &lt;br /&gt;
                         \&amp;quot;USA\&amp;quot;.&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_Country .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 9: Functional Dependency Value Rule (2 Conditions, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a value of one property must obtain a specific value if a second and third property have specific values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In an address data set, the city &amp;quot;New York&amp;quot; in the country &amp;quot;USA&amp;quot; must always have the value &amp;quot;NY&amp;quot; for the property foo:STATE.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:FunctionalDependencyViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SemanticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify the dependency between three property values, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Define both conditions under which a specific value is always required. &lt;br /&gt;
# Create an instance of the class [[dqm:FuncDepValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:FuncDepValueRule_2&lt;br /&gt;
      a       dqm:FuncDepValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Func dep value rule 2&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:equals &amp;quot;NY&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:hasCondition2 foo:Condition_New_York ;&lt;br /&gt;
      dqm:reqDescription &amp;quot;If the city value is \&amp;quot;New York\&amp;quot; and the country value is &lt;br /&gt;
                         \&amp;quot;USA\&amp;quot; then the state must be \&amp;quot;NY\&amp;quot;.&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 10: Expiry Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that instances of a specific class expire.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a product data set, the class foo:Product has instances with product offerings that expire on a certain date which is specified via the property foo:validThrough.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutdatedInstance]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:Timeliness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:ClassRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify that instances of a class have an expiry date by creating an instance of class [[dqm:ExpiryRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ExpiryRule_1&lt;br /&gt;
      a       dqm:ExpiryRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Expiry rule 1&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Product ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Product_validThrough .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 11: Expiry Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that instances of a specific class must be updated within a specified interval.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the class foo:Location has instances with address data that have timestamps of the last update. The instances shall not be elder than 1 year 2 months 3 days 5 hours 20 minutes and 30.123 seconds.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutdatedInstance]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:Timeliness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:ClassRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify a required update interval for instances of a specific property by creating an instance of class [[dqm:UpdateRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:UpdateRule_Location&lt;br /&gt;
      a       dqm:UpdateRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Update rule Location&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:expectedUpdateInterval &amp;quot;P1Y2M3DT5H20M30.123S&amp;quot;^^xsd:duration ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_timestamp .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''NOTE:'''&amp;lt;/span&amp;gt; The tested class must have a property that holds the time of the last update in order to be able to specify this requirement.&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Create_Data_Requirements</id>
		<title>Create Data Requirements</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Create_Data_Requirements"/>
				<updated>2011-10-20T20:32:28Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Examples of Data Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;This site is currently under construction!&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== What are Data Requirements? ==&lt;br /&gt;
&lt;br /&gt;
Data requirements are prescribed directives or consensual agreements that define the content and/or structure that constitute high quality data instances and values. Data requirements can thereby be stated by several different individuals or groups of individuals. Moreover, data requirments may also be based on laws, standards, or other directives. They may be agreed upon or contrary to each other.&lt;br /&gt;
&lt;br /&gt;
However, data requirements are required as a prerequisite to measure data quality. Hence, they serve as a benchmark that defines the desired state of data. In the following, we describe how you can express your data requirements via the DQM-Vocabulary.&lt;br /&gt;
&lt;br /&gt;
== Types of Data Requirements ==&lt;br /&gt;
&lt;br /&gt;
Data requirements usually refer to different data items. When we look at a table we usually have at least four types of data items, (1) columns, (2) rows, (3) schemata, and (4) the table/spreadsheet itself. &lt;br /&gt;
&lt;br /&gt;
[[File:Terminology.png|500px|Table to illustrate used terminology]]&lt;br /&gt;
&lt;br /&gt;
In Semantic Web environments, we can compare columns to properties, rows to instances, schemata to ontologies, and tables to classes. Data requirements can usually be related to one of these elements. In particular, there are &lt;br /&gt;
# data requirements related to the values of a single property (column)&lt;br /&gt;
# data requirements related to the values of multiple properties within an instance (multiple columns in a row)&lt;br /&gt;
# data requirements related to the instances of a whole class (table)&lt;br /&gt;
# data requirements related to the ontology elements (schema)&lt;br /&gt;
&lt;br /&gt;
With the DQM-Vocabulary, you can model the first three types of requirements. Schema/ontology requirements are currently not part of the vocabulary, but may be added in future releases. In the following, we explain how Property-, Multi-Property-, Class-, and Custom-Requirements can be modelled with the current version of the DQM-Vocabulary.&lt;br /&gt;
&lt;br /&gt;
==Define Tested Elements==&lt;br /&gt;
Before you can use your data with the DQM-Vocabulary, you have to declare the elements of your ontology that shall be used in the DQM-Vocabulary. You have two options to do this with impact on decidablility of potential reasoning with your knowledge base:&lt;br /&gt;
&lt;br /&gt;
=== Design Option 1: Classes and Properties as Instances (OWL Full) ===&lt;br /&gt;
Classes and properties that shall be tested for data requirement violations are defined as direct instances of the classes [[dqm:TestedClass]] or [[dqm:TestedProperty]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:MyClass a dqm:TestedClass&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:MyProperty a dqm:TestedProperty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;'''Attention:'''&amp;lt;/span&amp;gt; This will make your knowledge base OWL Full which is potentially not useful if you plan to use reasoning.&lt;br /&gt;
&lt;br /&gt;
=== Design Option 2: Mapping of Classes and Properties to new URIs (OWL DL) ===&lt;br /&gt;
Classes and properties that shall be tested for data requirement violations are mapped to new instances of the classes [[dqm:TestedClass]] and [[dqm:TestedProperty]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Class_1 a dqm:TestedClass&lt;br /&gt;
                dqm:hasURI &amp;quot;http://www.example.org/MyClass&amp;quot;^^xsd:anyURI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Property_1 a dqm:TestedProperty&lt;br /&gt;
                dqm:hasURI &amp;quot;http://www.example.org/MyProperty&amp;quot;^^xsd:anyURI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Sample Dataset used in Examples ==&lt;br /&gt;
The following examples use classes and properties from our sample dataset as [[dqm:TestedClass]] and [[dqm:TestedProperties]]. Requirements specified in OWL DL will use the mapped instances, while requirements specified in OWL Full will use the original classes and properties. The data set contains the following classes:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Original Class!!Mapped Instance&lt;br /&gt;
|-&lt;br /&gt;
|foo:Location||foo:Class_Location&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
...with the following datatype properties:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Original Property !! Mapped Instance&lt;br /&gt;
|-&lt;br /&gt;
|foo:LOCID ||foo:Prop_Location_ID&lt;br /&gt;
|-&lt;br /&gt;
|foo:STREET||foo:Prop_Location_Street&lt;br /&gt;
|-&lt;br /&gt;
|foo:STREETNO||foo:Prop_Location_Streetno&lt;br /&gt;
|-&lt;br /&gt;
|foo:ZIP||foo:Prop_Location_ZIP&lt;br /&gt;
|-&lt;br /&gt;
|foo:CITY||foo:Prop_Location_City&lt;br /&gt;
|-&lt;br /&gt;
|foo:COUNTRY||foo:Prop_Location_Country&lt;br /&gt;
|-&lt;br /&gt;
|foo:STATE||foo:Prop_Location_State&lt;br /&gt;
|-&lt;br /&gt;
|foo:validThrough||foo:Prop_validThrough&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to apply the example to your own data, you need to exchange the sample classes and properties used in the data requirements by your own.&lt;br /&gt;
&lt;br /&gt;
==Syntax Of Examples==&lt;br /&gt;
&lt;br /&gt;
The following examples show instance data in [http://www.w3.org/TeamSubmission/turtle/ Turtle/Notation 3 syntax].&lt;br /&gt;
&lt;br /&gt;
== Examples of Data Requirements ==&lt;br /&gt;
&lt;br /&gt;
===Example 1: PropertyCompletenessRule===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a specific property and/or its values must exist for all instances of a specific class.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:COUNTRY must exist and have a value in all instances of the class foo:Location.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:MissingPropertyAndValue]] [[dqm:MissingProperty]] [[dqm:MissingValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyCompleteness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you defined your data elements in OWL Full ([[#Option 1: Classes and Properties as Instances (OWL Full)|Option 1]]), then you can simply use the URIs of your ontology in the definition of the Property Completeness Rule as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Definition in OWL Full'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:PropertyCompletenessRule_1&lt;br /&gt;
      a       dqm:PropertyCompletenessRule ;&lt;br /&gt;
      dqm:testedClass http://www.example.org/MyClass ;&lt;br /&gt;
      dqm:testedProperty1 http://www.example.org/MyProperty ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 1.1: Property Completeness Violations (OWL Full Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The property [[dqm:requiredProperty]] specifies that the property &amp;quot;MyProperty&amp;quot; must exist in each instance. The property [[dqm:requiredValue]] specifies that a value must exist for property &amp;quot;MyProperty&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you mapped your own ontology elements to new URIs ([[#Option 2: Mapping of Classes and Properties to new URIs (OWL DL)|Option 2]], OWL DL), then the following example will help you to define a Property Completeness Rule:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Definition in OWL-DL'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:PropertyCompletenessRule_1&lt;br /&gt;
      a       dqm:PropertyCompletenessRule ;&lt;br /&gt;
      dqm:testedClass foo:Class_1 ;&lt;br /&gt;
      dqm:testedProperty1 foo:Property_1 ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 1.2: Property Completeness Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The property [[dqm:requiredProperty]] specifies that the property &amp;quot;MyProperty&amp;quot; which is mapped to &amp;quot;foo:Property_1&amp;quot; must exist in each instance of the class &amp;quot;MyClass&amp;quot; which is mapped to &amp;quot;foo:Class_1&amp;quot;. The property [[dqm:requiredValue]] specifies that also a value must exist for property &amp;quot;foo:Property_1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Example 2: Conditional Property Completeness Rule (1 Condition, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a specific property and/or its values must exist if another property obtains a specific value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:STATE must exist and have a value in all instances of the class foo:Location that have value &amp;quot;USA&amp;quot; for the property foo:COUNTRY.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:MissingPropertyAndValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyCompleteness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To define this data requirement, you must perform the following two steps:&lt;br /&gt;
&lt;br /&gt;
'''1. Define the Condition'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Condition_USA&lt;br /&gt;
      a       dqm:Condition ;&lt;br /&gt;
      rdfs:label &amp;quot;Condition USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:conditionalProperty foo:Prop_Location_Country ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2. Define the Conditional Property Completeness Rule'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ConditionalPropertyCompletenessRule_State&lt;br /&gt;
      a       dqm:ConditionalPropertyCompletenessRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Conditional property completeness rule State&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 2: Conditional Property Completeness Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 3: Syntax Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a specific property must obtain a specific syntax.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:ZIP must contain values with exactly five digits.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:SyntaxViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify syntax requirements by creating an instance of the class [[dqm:SyntaxRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:SyntaxRule_ZIP&lt;br /&gt;
      a       dqm:SyntaxRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Syntax rule ZIP&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:regex &amp;quot;^[0-9]{5}$&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Property_ZIP .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Generate_Problem_Reports#Example 3: Syntax Rule Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 4:  Conditional Syntax Rule (1 Condition, OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a specific property must obtain a specific syntax if another property obtains a specific value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:STATE must contain a value with two letters if the property foo:COUNTRY has the value &amp;quot;USA&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:SyntaxViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify a conditional syntax rule, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
'''1.Define Condition'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Condition_USA&lt;br /&gt;
      a       dqm:Condition ;&lt;br /&gt;
      rdfs:label &amp;quot;Condition USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:conditionalProperty foo:Prop_Location_Country ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2.Define Conditional Syntax Rule'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ConditionalSyntaxRule_State&lt;br /&gt;
      a       dqm:ConditionalSyntaxRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Conditional syntax rule State&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:regex &amp;quot;^[A-Z]{2}$&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5: Legal Value Range Rule (OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify valid value ranges for properties that hold numeric values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a product data set, the property foo:PRICE can never contain negative values.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutOfRangeValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify a legal value range for a property by adding the following instance data to the class [[dqm:LegalValueRangeRule]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:LegalValueRangeRule_Price&lt;br /&gt;
      a       dqm:LegalValueRangeRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Legal value range rule Price&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:lowerLimit &amp;quot;0.00&amp;quot;^^xsd:float ;&lt;br /&gt;
      dqm:testedClass foo:Class_Product ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Product_Price .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The class [[dqm:LegalValueRangeRule]] has the special properties&lt;br /&gt;
* [[dqm:lowerLimit]]&lt;br /&gt;
* [[dqm:upperLimit]]&lt;br /&gt;
&lt;br /&gt;
to specify the lowest and/or highest allowed value.&lt;br /&gt;
&lt;br /&gt;
===Example 6: Legal Value Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify a reference property that holds the allowed values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:COUNTRY can only contain values of the trusted property foo:legalValue in the trusted class foo:LegalValueCountry.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:IllegalValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify legal values for a specific property, you need to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Create a reference data set or use an existing data set that holds the legal values &lt;br /&gt;
# Specify the class and property which hold the legal values as [[dqm:TrustedClass]] and [[dqm:TrustedProperty]]&lt;br /&gt;
# Create an instance of [[dqm:LegalValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:LegalValueRule_Country&lt;br /&gt;
      a       dqm:LegalValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Legal value rule Country&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:referenceClass foo:TrustedClass_LegalValueCountry ;&lt;br /&gt;
      dqm:referenceProperty1 foo:TrustedProperty_LegalValue ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_Country .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 7: Unique Value Rule (OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a property must be unique.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:LOCID of class foo:Location must only contain unique values.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:UniquenessViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyUniqueness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify that values of a property must be unique by creating an instance of the class [[dqm:UniqueValueRule]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:UniqueValueRule_LOCID&lt;br /&gt;
      a       dqm:UniqueValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Unique value rule LOCID&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_ID .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 8: Functional Dependency Value Rule (1 Condition, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a value of one property must obtain a specific value if a second property has a certain value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In an address data set, the city name &amp;quot;New York&amp;quot; must always have the value &amp;quot;USA&amp;quot; for the property foo:COUNTRY.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:FunctionalDependencyViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SemanticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify the dependency between two property values, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Define a condition under which a specific value is always required. &lt;br /&gt;
# Create an instance of the class [[dqm:FuncDepValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:FuncDepValueRule_1&lt;br /&gt;
      a       dqm:FuncDepValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Func dep value rule 1&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_New_York ;&lt;br /&gt;
      dqm:reqDescription &amp;quot;If the city value is \&amp;quot;New York\&amp;quot; then the country must be     &lt;br /&gt;
                         \&amp;quot;USA\&amp;quot;.&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_Country .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 9: Functional Dependency Value Rule (2 Conditions, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a value of one property must obtain a specific value if a second and third property have specific values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In an address data set, the city &amp;quot;New York&amp;quot; in the country &amp;quot;USA&amp;quot; must always have the value &amp;quot;NY&amp;quot; for the property foo:STATE.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:FunctionalDependencyViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SemanticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify the dependency between three property values, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Define both conditions under which a specific value is always required. &lt;br /&gt;
# Create an instance of the class [[dqm:FuncDepValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:FuncDepValueRule_2&lt;br /&gt;
      a       dqm:FuncDepValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Func dep value rule 2&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:equals &amp;quot;NY&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:hasCondition2 foo:Condition_New_York ;&lt;br /&gt;
      dqm:reqDescription &amp;quot;If the city value is \&amp;quot;New York\&amp;quot; and the country value is &lt;br /&gt;
                         \&amp;quot;USA\&amp;quot; then the state must be \&amp;quot;NY\&amp;quot;.&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 10: Expiry Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that instances of a specific class expire.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a product data set, the class foo:Product has instances with product offerings that expire on a certain date which is specified via the property foo:validThrough.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutdatedInstance]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:Timeliness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:ClassRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify that instances of a class have an expiry date by creating an instance of class [[dqm:ExpiryRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ExpiryRule_1&lt;br /&gt;
      a       dqm:ExpiryRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Expiry rule 1&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Product ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Product_validThrough .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 11: Expiry Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that instances of a specific class must be updated within a specified interval.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the class foo:Location has instances with address data that have timestamps of the last update. The instances shall not be elder than 1 year 2 months 3 days 5 hours 20 minutes and 30.123 seconds.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutdatedInstance]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:Timeliness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:ClassRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify a required update interval for instances of a specific property by creating an instance of class [[dqm:UpdateRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:UpdateRule_Location&lt;br /&gt;
      a       dqm:UpdateRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Update rule Location&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:expectedUpdateInterval &amp;quot;P1Y2M3DT5H20M30.123S&amp;quot;^^xsd:duration ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_timestamp .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''NOTE:'''&amp;lt;/span&amp;gt; The tested class must have a property that holds the time of the last update in order to be able to specify this requirement.&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Create_Data_Requirements</id>
		<title>Create Data Requirements</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Create_Data_Requirements"/>
				<updated>2011-10-20T20:31:15Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Example 1: PropertyCompletenessRule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;This site is currently under construction!&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== What are Data Requirements? ==&lt;br /&gt;
&lt;br /&gt;
Data requirements are prescribed directives or consensual agreements that define the content and/or structure that constitute high quality data instances and values. Data requirements can thereby be stated by several different individuals or groups of individuals. Moreover, data requirments may also be based on laws, standards, or other directives. They may be agreed upon or contrary to each other.&lt;br /&gt;
&lt;br /&gt;
However, data requirements are required as a prerequisite to measure data quality. Hence, they serve as a benchmark that defines the desired state of data. In the following, we describe how you can express your data requirements via the DQM-Vocabulary.&lt;br /&gt;
&lt;br /&gt;
== Types of Data Requirements ==&lt;br /&gt;
&lt;br /&gt;
Data requirements usually refer to different data items. When we look at a table we usually have at least four types of data items, (1) columns, (2) rows, (3) schemata, and (4) the table/spreadsheet itself. &lt;br /&gt;
&lt;br /&gt;
[[File:Terminology.png|500px|Table to illustrate used terminology]]&lt;br /&gt;
&lt;br /&gt;
In Semantic Web environments, we can compare columns to properties, rows to instances, schemata to ontologies, and tables to classes. Data requirements can usually be related to one of these elements. In particular, there are &lt;br /&gt;
# data requirements related to the values of a single property (column)&lt;br /&gt;
# data requirements related to the values of multiple properties within an instance (multiple columns in a row)&lt;br /&gt;
# data requirements related to the instances of a whole class (table)&lt;br /&gt;
# data requirements related to the ontology elements (schema)&lt;br /&gt;
&lt;br /&gt;
With the DQM-Vocabulary, you can model the first three types of requirements. Schema/ontology requirements are currently not part of the vocabulary, but may be added in future releases. In the following, we explain how Property-, Multi-Property-, Class-, and Custom-Requirements can be modelled with the current version of the DQM-Vocabulary.&lt;br /&gt;
&lt;br /&gt;
==Define Tested Elements==&lt;br /&gt;
Before you can use your data with the DQM-Vocabulary, you have to declare the elements of your ontology that shall be used in the DQM-Vocabulary. You have two options to do this with impact on decidablility of potential reasoning with your knowledge base:&lt;br /&gt;
&lt;br /&gt;
=== Design Option 1: Classes and Properties as Instances (OWL Full) ===&lt;br /&gt;
Classes and properties that shall be tested for data requirement violations are defined as direct instances of the classes [[dqm:TestedClass]] or [[dqm:TestedProperty]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:MyClass a dqm:TestedClass&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:MyProperty a dqm:TestedProperty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;'''Attention:'''&amp;lt;/span&amp;gt; This will make your knowledge base OWL Full which is potentially not useful if you plan to use reasoning.&lt;br /&gt;
&lt;br /&gt;
=== Design Option 2: Mapping of Classes and Properties to new URIs (OWL DL) ===&lt;br /&gt;
Classes and properties that shall be tested for data requirement violations are mapped to new instances of the classes [[dqm:TestedClass]] and [[dqm:TestedProperty]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Class_1 a dqm:TestedClass&lt;br /&gt;
                dqm:hasURI &amp;quot;http://www.example.org/MyClass&amp;quot;^^xsd:anyURI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Property_1 a dqm:TestedProperty&lt;br /&gt;
                dqm:hasURI &amp;quot;http://www.example.org/MyProperty&amp;quot;^^xsd:anyURI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples of Data Requirements ==&lt;br /&gt;
&lt;br /&gt;
=== Sample Dataset used in Examples ===&lt;br /&gt;
The following examples use classes and properties from our sample dataset as [[dqm:TestedClass]] and [[dqm:TestedProperties]]. Requirements specified in OWL DL will use the mapped instances, while requirements specified in OWL Full will use the original classes and properties. The data set contains the following classes:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Original Class!!Mapped Instance&lt;br /&gt;
|-&lt;br /&gt;
|foo:Location||foo:Class_Location&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
...with the following datatype properties:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Original Property !! Mapped Instance&lt;br /&gt;
|-&lt;br /&gt;
|foo:LOCID ||foo:Prop_Location_ID&lt;br /&gt;
|-&lt;br /&gt;
|foo:STREET||foo:Prop_Location_Street&lt;br /&gt;
|-&lt;br /&gt;
|foo:STREETNO||foo:Prop_Location_Streetno&lt;br /&gt;
|-&lt;br /&gt;
|foo:ZIP||foo:Prop_Location_ZIP&lt;br /&gt;
|-&lt;br /&gt;
|foo:CITY||foo:Prop_Location_City&lt;br /&gt;
|-&lt;br /&gt;
|foo:COUNTRY||foo:Prop_Location_Country&lt;br /&gt;
|-&lt;br /&gt;
|foo:STATE||foo:Prop_Location_State&lt;br /&gt;
|-&lt;br /&gt;
|foo:validThrough||foo:Prop_validThrough&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to apply the example to your own data, you need to exchange the sample classes and properties used in the data requirements by your own.&lt;br /&gt;
&lt;br /&gt;
===Syntax Of Examples===&lt;br /&gt;
&lt;br /&gt;
The following examples show instance data in [http://www.w3.org/TeamSubmission/turtle/ Turtle/Notation 3 syntax].&lt;br /&gt;
&lt;br /&gt;
===Example 1: PropertyCompletenessRule===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a specific property and/or its values must exist for all instances of a specific class.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:COUNTRY must exist and have a value in all instances of the class foo:Location.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:MissingPropertyAndValue]] [[dqm:MissingProperty]] [[dqm:MissingValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyCompleteness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you defined your data elements in OWL Full ([[#Option 1: Classes and Properties as Instances (OWL Full)|Option 1]]), then you can simply use the URIs of your ontology in the definition of the Property Completeness Rule as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Definition in OWL Full'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:PropertyCompletenessRule_1&lt;br /&gt;
      a       dqm:PropertyCompletenessRule ;&lt;br /&gt;
      dqm:testedClass http://www.example.org/MyClass ;&lt;br /&gt;
      dqm:testedProperty1 http://www.example.org/MyProperty ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 1.1: Property Completeness Violations (OWL Full Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The property [[dqm:requiredProperty]] specifies that the property &amp;quot;MyProperty&amp;quot; must exist in each instance. The property [[dqm:requiredValue]] specifies that a value must exist for property &amp;quot;MyProperty&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you mapped your own ontology elements to new URIs ([[#Option 2: Mapping of Classes and Properties to new URIs (OWL DL)|Option 2]], OWL DL), then the following example will help you to define a Property Completeness Rule:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Definition in OWL-DL'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:PropertyCompletenessRule_1&lt;br /&gt;
      a       dqm:PropertyCompletenessRule ;&lt;br /&gt;
      dqm:testedClass foo:Class_1 ;&lt;br /&gt;
      dqm:testedProperty1 foo:Property_1 ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 1.2: Property Completeness Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The property [[dqm:requiredProperty]] specifies that the property &amp;quot;MyProperty&amp;quot; which is mapped to &amp;quot;foo:Property_1&amp;quot; must exist in each instance of the class &amp;quot;MyClass&amp;quot; which is mapped to &amp;quot;foo:Class_1&amp;quot;. The property [[dqm:requiredValue]] specifies that also a value must exist for property &amp;quot;foo:Property_1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Example 2: Conditional Property Completeness Rule (1 Condition, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a specific property and/or its values must exist if another property obtains a specific value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:STATE must exist and have a value in all instances of the class foo:Location that have value &amp;quot;USA&amp;quot; for the property foo:COUNTRY.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:MissingPropertyAndValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyCompleteness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To define this data requirement, you must perform the following two steps:&lt;br /&gt;
&lt;br /&gt;
'''1. Define the Condition'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Condition_USA&lt;br /&gt;
      a       dqm:Condition ;&lt;br /&gt;
      rdfs:label &amp;quot;Condition USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:conditionalProperty foo:Prop_Location_Country ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2. Define the Conditional Property Completeness Rule'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ConditionalPropertyCompletenessRule_State&lt;br /&gt;
      a       dqm:ConditionalPropertyCompletenessRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Conditional property completeness rule State&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 2: Conditional Property Completeness Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 3: Syntax Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a specific property must obtain a specific syntax.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:ZIP must contain values with exactly five digits.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:SyntaxViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify syntax requirements by creating an instance of the class [[dqm:SyntaxRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:SyntaxRule_ZIP&lt;br /&gt;
      a       dqm:SyntaxRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Syntax rule ZIP&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:regex &amp;quot;^[0-9]{5}$&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Property_ZIP .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Generate_Problem_Reports#Example 3: Syntax Rule Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 4:  Conditional Syntax Rule (1 Condition, OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a specific property must obtain a specific syntax if another property obtains a specific value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:STATE must contain a value with two letters if the property foo:COUNTRY has the value &amp;quot;USA&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:SyntaxViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify a conditional syntax rule, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
'''1.Define Condition'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Condition_USA&lt;br /&gt;
      a       dqm:Condition ;&lt;br /&gt;
      rdfs:label &amp;quot;Condition USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:conditionalProperty foo:Prop_Location_Country ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2.Define Conditional Syntax Rule'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ConditionalSyntaxRule_State&lt;br /&gt;
      a       dqm:ConditionalSyntaxRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Conditional syntax rule State&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:regex &amp;quot;^[A-Z]{2}$&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5: Legal Value Range Rule (OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify valid value ranges for properties that hold numeric values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a product data set, the property foo:PRICE can never contain negative values.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutOfRangeValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify a legal value range for a property by adding the following instance data to the class [[dqm:LegalValueRangeRule]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:LegalValueRangeRule_Price&lt;br /&gt;
      a       dqm:LegalValueRangeRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Legal value range rule Price&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:lowerLimit &amp;quot;0.00&amp;quot;^^xsd:float ;&lt;br /&gt;
      dqm:testedClass foo:Class_Product ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Product_Price .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The class [[dqm:LegalValueRangeRule]] has the special properties&lt;br /&gt;
* [[dqm:lowerLimit]]&lt;br /&gt;
* [[dqm:upperLimit]]&lt;br /&gt;
&lt;br /&gt;
to specify the lowest and/or highest allowed value.&lt;br /&gt;
&lt;br /&gt;
===Example 6: Legal Value Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify a reference property that holds the allowed values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:COUNTRY can only contain values of the trusted property foo:legalValue in the trusted class foo:LegalValueCountry.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:IllegalValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify legal values for a specific property, you need to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Create a reference data set or use an existing data set that holds the legal values &lt;br /&gt;
# Specify the class and property which hold the legal values as [[dqm:TrustedClass]] and [[dqm:TrustedProperty]]&lt;br /&gt;
# Create an instance of [[dqm:LegalValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:LegalValueRule_Country&lt;br /&gt;
      a       dqm:LegalValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Legal value rule Country&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:referenceClass foo:TrustedClass_LegalValueCountry ;&lt;br /&gt;
      dqm:referenceProperty1 foo:TrustedProperty_LegalValue ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_Country .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 7: Unique Value Rule (OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a property must be unique.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:LOCID of class foo:Location must only contain unique values.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:UniquenessViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyUniqueness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify that values of a property must be unique by creating an instance of the class [[dqm:UniqueValueRule]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:UniqueValueRule_LOCID&lt;br /&gt;
      a       dqm:UniqueValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Unique value rule LOCID&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_ID .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 8: Functional Dependency Value Rule (1 Condition, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a value of one property must obtain a specific value if a second property has a certain value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In an address data set, the city name &amp;quot;New York&amp;quot; must always have the value &amp;quot;USA&amp;quot; for the property foo:COUNTRY.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:FunctionalDependencyViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SemanticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify the dependency between two property values, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Define a condition under which a specific value is always required. &lt;br /&gt;
# Create an instance of the class [[dqm:FuncDepValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:FuncDepValueRule_1&lt;br /&gt;
      a       dqm:FuncDepValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Func dep value rule 1&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_New_York ;&lt;br /&gt;
      dqm:reqDescription &amp;quot;If the city value is \&amp;quot;New York\&amp;quot; then the country must be     &lt;br /&gt;
                         \&amp;quot;USA\&amp;quot;.&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_Country .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 9: Functional Dependency Value Rule (2 Conditions, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a value of one property must obtain a specific value if a second and third property have specific values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In an address data set, the city &amp;quot;New York&amp;quot; in the country &amp;quot;USA&amp;quot; must always have the value &amp;quot;NY&amp;quot; for the property foo:STATE.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:FunctionalDependencyViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SemanticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify the dependency between three property values, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Define both conditions under which a specific value is always required. &lt;br /&gt;
# Create an instance of the class [[dqm:FuncDepValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:FuncDepValueRule_2&lt;br /&gt;
      a       dqm:FuncDepValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Func dep value rule 2&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:equals &amp;quot;NY&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:hasCondition2 foo:Condition_New_York ;&lt;br /&gt;
      dqm:reqDescription &amp;quot;If the city value is \&amp;quot;New York\&amp;quot; and the country value is &lt;br /&gt;
                         \&amp;quot;USA\&amp;quot; then the state must be \&amp;quot;NY\&amp;quot;.&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 10: Expiry Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that instances of a specific class expire.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a product data set, the class foo:Product has instances with product offerings that expire on a certain date which is specified via the property foo:validThrough.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutdatedInstance]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:Timeliness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:ClassRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify that instances of a class have an expiry date by creating an instance of class [[dqm:ExpiryRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ExpiryRule_1&lt;br /&gt;
      a       dqm:ExpiryRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Expiry rule 1&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Product ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Product_validThrough .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 11: Expiry Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that instances of a specific class must be updated within a specified interval.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the class foo:Location has instances with address data that have timestamps of the last update. The instances shall not be elder than 1 year 2 months 3 days 5 hours 20 minutes and 30.123 seconds.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutdatedInstance]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:Timeliness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:ClassRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify a required update interval for instances of a specific property by creating an instance of class [[dqm:UpdateRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:UpdateRule_Location&lt;br /&gt;
      a       dqm:UpdateRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Update rule Location&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:expectedUpdateInterval &amp;quot;P1Y2M3DT5H20M30.123S&amp;quot;^^xsd:duration ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_timestamp .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''NOTE:'''&amp;lt;/span&amp;gt; The tested class must have a property that holds the time of the last update in order to be able to specify this requirement.&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Create_Data_Requirements</id>
		<title>Create Data Requirements</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Create_Data_Requirements"/>
				<updated>2011-10-20T20:27:49Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Sample Dataset used in Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;This site is currently under construction!&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== What are Data Requirements? ==&lt;br /&gt;
&lt;br /&gt;
Data requirements are prescribed directives or consensual agreements that define the content and/or structure that constitute high quality data instances and values. Data requirements can thereby be stated by several different individuals or groups of individuals. Moreover, data requirments may also be based on laws, standards, or other directives. They may be agreed upon or contrary to each other.&lt;br /&gt;
&lt;br /&gt;
However, data requirements are required as a prerequisite to measure data quality. Hence, they serve as a benchmark that defines the desired state of data. In the following, we describe how you can express your data requirements via the DQM-Vocabulary.&lt;br /&gt;
&lt;br /&gt;
== Types of Data Requirements ==&lt;br /&gt;
&lt;br /&gt;
Data requirements usually refer to different data items. When we look at a table we usually have at least four types of data items, (1) columns, (2) rows, (3) schemata, and (4) the table/spreadsheet itself. &lt;br /&gt;
&lt;br /&gt;
[[File:Terminology.png|500px|Table to illustrate used terminology]]&lt;br /&gt;
&lt;br /&gt;
In Semantic Web environments, we can compare columns to properties, rows to instances, schemata to ontologies, and tables to classes. Data requirements can usually be related to one of these elements. In particular, there are &lt;br /&gt;
# data requirements related to the values of a single property (column)&lt;br /&gt;
# data requirements related to the values of multiple properties within an instance (multiple columns in a row)&lt;br /&gt;
# data requirements related to the instances of a whole class (table)&lt;br /&gt;
# data requirements related to the ontology elements (schema)&lt;br /&gt;
&lt;br /&gt;
With the DQM-Vocabulary, you can model the first three types of requirements. Schema/ontology requirements are currently not part of the vocabulary, but may be added in future releases. In the following, we explain how Property-, Multi-Property-, Class-, and Custom-Requirements can be modelled with the current version of the DQM-Vocabulary.&lt;br /&gt;
&lt;br /&gt;
==Define Tested Elements==&lt;br /&gt;
Before you can use your data with the DQM-Vocabulary, you have to declare the elements of your ontology that shall be used in the DQM-Vocabulary. You have two options to do this with impact on decidablility of potential reasoning with your knowledge base:&lt;br /&gt;
&lt;br /&gt;
=== Design Option 1: Classes and Properties as Instances (OWL Full) ===&lt;br /&gt;
Classes and properties that shall be tested for data requirement violations are defined as direct instances of the classes [[dqm:TestedClass]] or [[dqm:TestedProperty]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:MyClass a dqm:TestedClass&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:MyProperty a dqm:TestedProperty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;'''Attention:'''&amp;lt;/span&amp;gt; This will make your knowledge base OWL Full which is potentially not useful if you plan to use reasoning.&lt;br /&gt;
&lt;br /&gt;
=== Design Option 2: Mapping of Classes and Properties to new URIs (OWL DL) ===&lt;br /&gt;
Classes and properties that shall be tested for data requirement violations are mapped to new instances of the classes [[dqm:TestedClass]] and [[dqm:TestedProperty]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Class_1 a dqm:TestedClass&lt;br /&gt;
                dqm:hasURI &amp;quot;http://www.example.org/MyClass&amp;quot;^^xsd:anyURI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Property_1 a dqm:TestedProperty&lt;br /&gt;
                dqm:hasURI &amp;quot;http://www.example.org/MyProperty&amp;quot;^^xsd:anyURI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples of Data Requirements ==&lt;br /&gt;
&lt;br /&gt;
=== Sample Dataset used in Examples ===&lt;br /&gt;
The following examples use classes and properties from our sample dataset as [[dqm:TestedClass]] and [[dqm:TestedProperties]]. Requirements specified in OWL DL will use the mapped instances, while requirements specified in OWL Full will use the original classes and properties. The data set contains the following classes:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Original Class!!Mapped Instance&lt;br /&gt;
|-&lt;br /&gt;
|foo:Location||foo:Class_Location&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
...with the following datatype properties:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Original Property !! Mapped Instance&lt;br /&gt;
|-&lt;br /&gt;
|foo:LOCID ||foo:Prop_Location_ID&lt;br /&gt;
|-&lt;br /&gt;
|foo:STREET||foo:Prop_Location_Street&lt;br /&gt;
|-&lt;br /&gt;
|foo:STREETNO||foo:Prop_Location_Streetno&lt;br /&gt;
|-&lt;br /&gt;
|foo:ZIP||foo:Prop_Location_ZIP&lt;br /&gt;
|-&lt;br /&gt;
|foo:CITY||foo:Prop_Location_City&lt;br /&gt;
|-&lt;br /&gt;
|foo:COUNTRY||foo:Prop_Location_Country&lt;br /&gt;
|-&lt;br /&gt;
|foo:STATE||foo:Prop_Location_State&lt;br /&gt;
|-&lt;br /&gt;
|foo:validThrough||foo:Prop_validThrough&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to apply the example to your own data, you need to exchange the sample classes and properties used in the data requirements by your own.&lt;br /&gt;
&lt;br /&gt;
===Syntax Of Examples===&lt;br /&gt;
&lt;br /&gt;
The following examples show instance data in [http://www.w3.org/TeamSubmission/turtle/ Turtle/Notation 3 syntax].&lt;br /&gt;
&lt;br /&gt;
===Example 1: PropertyCompletenessRule===&lt;br /&gt;
A property completeness rule is a data requirement that specifies that a certain property and/or its value must exist in all instances of a certain class.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a specific property and/or its values must exist for all instances of a specific class.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:COUNTRY must exist and have a value in all instances of the class foo:Location.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:MissingPropertyAndValue]] [[dqm:MissingProperty]] [[dqm:MissingValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyCompleteness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you defined your data elements in OWL Full ([[#Option 1: Classes and Properties as Instances (OWL Full)|Option 1]]), then you can simply use the URIs of your ontology in the definition of the Property Completeness Rule as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Definition in OWL Full'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:PropertyCompletenessRule_1&lt;br /&gt;
      a       dqm:PropertyCompletenessRule ;&lt;br /&gt;
      dqm:testedClass http://www.example.org/MyClass ;&lt;br /&gt;
      dqm:testedProperty1 http://www.example.org/MyProperty ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 1.1: Property Completeness Violations (OWL Full Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The property [[dqm:requiredProperty]] specifies that the property &amp;quot;MyProperty&amp;quot; must exist in each instance. The property [[dqm:requiredValue]] specifies that a value must exist for property &amp;quot;MyProperty&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you mapped your own ontology elements to new URIs ([[#Option 2: Mapping of Classes and Properties to new URIs (OWL DL)|Option 2]], OWL DL), then the following example will help you to define a Property Completeness Rule:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Definition in OWL-DL'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:PropertyCompletenessRule_1&lt;br /&gt;
      a       dqm:PropertyCompletenessRule ;&lt;br /&gt;
      dqm:testedClass foo:Class_1 ;&lt;br /&gt;
      dqm:testedProperty1 foo:Property_1 ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 1.2: Property Completeness Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The property [[dqm:requiredProperty]] specifies that the property &amp;quot;MyProperty&amp;quot; which is mapped to &amp;quot;foo:Property_1&amp;quot; must exist in each instance of the class &amp;quot;MyClass&amp;quot; which is mapped to &amp;quot;foo:Class_1&amp;quot;. The property [[dqm:requiredValue]] specifies that also a value must exist for property &amp;quot;foo:Property_1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Example 2: Conditional Property Completeness Rule (1 Condition, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a specific property and/or its values must exist if another property obtains a specific value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:STATE must exist and have a value in all instances of the class foo:Location that have value &amp;quot;USA&amp;quot; for the property foo:COUNTRY.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:MissingPropertyAndValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyCompleteness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To define this data requirement, you must perform the following two steps:&lt;br /&gt;
&lt;br /&gt;
'''1. Define the Condition'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Condition_USA&lt;br /&gt;
      a       dqm:Condition ;&lt;br /&gt;
      rdfs:label &amp;quot;Condition USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:conditionalProperty foo:Prop_Location_Country ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2. Define the Conditional Property Completeness Rule'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ConditionalPropertyCompletenessRule_State&lt;br /&gt;
      a       dqm:ConditionalPropertyCompletenessRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Conditional property completeness rule State&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 2: Conditional Property Completeness Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 3: Syntax Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a specific property must obtain a specific syntax.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:ZIP must contain values with exactly five digits.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:SyntaxViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify syntax requirements by creating an instance of the class [[dqm:SyntaxRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:SyntaxRule_ZIP&lt;br /&gt;
      a       dqm:SyntaxRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Syntax rule ZIP&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:regex &amp;quot;^[0-9]{5}$&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Property_ZIP .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Generate_Problem_Reports#Example 3: Syntax Rule Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 4:  Conditional Syntax Rule (1 Condition, OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a specific property must obtain a specific syntax if another property obtains a specific value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:STATE must contain a value with two letters if the property foo:COUNTRY has the value &amp;quot;USA&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:SyntaxViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify a conditional syntax rule, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
'''1.Define Condition'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Condition_USA&lt;br /&gt;
      a       dqm:Condition ;&lt;br /&gt;
      rdfs:label &amp;quot;Condition USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:conditionalProperty foo:Prop_Location_Country ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2.Define Conditional Syntax Rule'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ConditionalSyntaxRule_State&lt;br /&gt;
      a       dqm:ConditionalSyntaxRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Conditional syntax rule State&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:regex &amp;quot;^[A-Z]{2}$&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5: Legal Value Range Rule (OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify valid value ranges for properties that hold numeric values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a product data set, the property foo:PRICE can never contain negative values.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutOfRangeValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify a legal value range for a property by adding the following instance data to the class [[dqm:LegalValueRangeRule]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:LegalValueRangeRule_Price&lt;br /&gt;
      a       dqm:LegalValueRangeRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Legal value range rule Price&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:lowerLimit &amp;quot;0.00&amp;quot;^^xsd:float ;&lt;br /&gt;
      dqm:testedClass foo:Class_Product ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Product_Price .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The class [[dqm:LegalValueRangeRule]] has the special properties&lt;br /&gt;
* [[dqm:lowerLimit]]&lt;br /&gt;
* [[dqm:upperLimit]]&lt;br /&gt;
&lt;br /&gt;
to specify the lowest and/or highest allowed value.&lt;br /&gt;
&lt;br /&gt;
===Example 6: Legal Value Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify a reference property that holds the allowed values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:COUNTRY can only contain values of the trusted property foo:legalValue in the trusted class foo:LegalValueCountry.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:IllegalValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify legal values for a specific property, you need to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Create a reference data set or use an existing data set that holds the legal values &lt;br /&gt;
# Specify the class and property which hold the legal values as [[dqm:TrustedClass]] and [[dqm:TrustedProperty]]&lt;br /&gt;
# Create an instance of [[dqm:LegalValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:LegalValueRule_Country&lt;br /&gt;
      a       dqm:LegalValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Legal value rule Country&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:referenceClass foo:TrustedClass_LegalValueCountry ;&lt;br /&gt;
      dqm:referenceProperty1 foo:TrustedProperty_LegalValue ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_Country .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 7: Unique Value Rule (OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a property must be unique.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:LOCID of class foo:Location must only contain unique values.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:UniquenessViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyUniqueness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify that values of a property must be unique by creating an instance of the class [[dqm:UniqueValueRule]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:UniqueValueRule_LOCID&lt;br /&gt;
      a       dqm:UniqueValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Unique value rule LOCID&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_ID .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 8: Functional Dependency Value Rule (1 Condition, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a value of one property must obtain a specific value if a second property has a certain value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In an address data set, the city name &amp;quot;New York&amp;quot; must always have the value &amp;quot;USA&amp;quot; for the property foo:COUNTRY.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:FunctionalDependencyViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SemanticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify the dependency between two property values, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Define a condition under which a specific value is always required. &lt;br /&gt;
# Create an instance of the class [[dqm:FuncDepValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:FuncDepValueRule_1&lt;br /&gt;
      a       dqm:FuncDepValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Func dep value rule 1&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_New_York ;&lt;br /&gt;
      dqm:reqDescription &amp;quot;If the city value is \&amp;quot;New York\&amp;quot; then the country must be     &lt;br /&gt;
                         \&amp;quot;USA\&amp;quot;.&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_Country .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 9: Functional Dependency Value Rule (2 Conditions, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a value of one property must obtain a specific value if a second and third property have specific values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In an address data set, the city &amp;quot;New York&amp;quot; in the country &amp;quot;USA&amp;quot; must always have the value &amp;quot;NY&amp;quot; for the property foo:STATE.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:FunctionalDependencyViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SemanticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify the dependency between three property values, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Define both conditions under which a specific value is always required. &lt;br /&gt;
# Create an instance of the class [[dqm:FuncDepValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:FuncDepValueRule_2&lt;br /&gt;
      a       dqm:FuncDepValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Func dep value rule 2&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:equals &amp;quot;NY&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:hasCondition2 foo:Condition_New_York ;&lt;br /&gt;
      dqm:reqDescription &amp;quot;If the city value is \&amp;quot;New York\&amp;quot; and the country value is &lt;br /&gt;
                         \&amp;quot;USA\&amp;quot; then the state must be \&amp;quot;NY\&amp;quot;.&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 10: Expiry Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that instances of a specific class expire.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a product data set, the class foo:Product has instances with product offerings that expire on a certain date which is specified via the property foo:validThrough.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutdatedInstance]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:Timeliness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:ClassRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify that instances of a class have an expiry date by creating an instance of class [[dqm:ExpiryRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ExpiryRule_1&lt;br /&gt;
      a       dqm:ExpiryRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Expiry rule 1&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Product ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Product_validThrough .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 11: Expiry Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that instances of a specific class must be updated within a specified interval.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the class foo:Location has instances with address data that have timestamps of the last update. The instances shall not be elder than 1 year 2 months 3 days 5 hours 20 minutes and 30.123 seconds.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutdatedInstance]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:Timeliness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:ClassRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify a required update interval for instances of a specific property by creating an instance of class [[dqm:UpdateRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:UpdateRule_Location&lt;br /&gt;
      a       dqm:UpdateRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Update rule Location&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:expectedUpdateInterval &amp;quot;P1Y2M3DT5H20M30.123S&amp;quot;^^xsd:duration ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_timestamp .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''NOTE:'''&amp;lt;/span&amp;gt; The tested class must have a property that holds the time of the last update in order to be able to specify this requirement.&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Create_Data_Requirements</id>
		<title>Create Data Requirements</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Create_Data_Requirements"/>
				<updated>2011-10-20T20:23:38Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Example 2: Conditional Property Completeness Rule (1 Condition, OWL DL) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;This site is currently under construction!&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== What are Data Requirements? ==&lt;br /&gt;
&lt;br /&gt;
Data requirements are prescribed directives or consensual agreements that define the content and/or structure that constitute high quality data instances and values. Data requirements can thereby be stated by several different individuals or groups of individuals. Moreover, data requirments may also be based on laws, standards, or other directives. They may be agreed upon or contrary to each other.&lt;br /&gt;
&lt;br /&gt;
However, data requirements are required as a prerequisite to measure data quality. Hence, they serve as a benchmark that defines the desired state of data. In the following, we describe how you can express your data requirements via the DQM-Vocabulary.&lt;br /&gt;
&lt;br /&gt;
== Types of Data Requirements ==&lt;br /&gt;
&lt;br /&gt;
Data requirements usually refer to different data items. When we look at a table we usually have at least four types of data items, (1) columns, (2) rows, (3) schemata, and (4) the table/spreadsheet itself. &lt;br /&gt;
&lt;br /&gt;
[[File:Terminology.png|500px|Table to illustrate used terminology]]&lt;br /&gt;
&lt;br /&gt;
In Semantic Web environments, we can compare columns to properties, rows to instances, schemata to ontologies, and tables to classes. Data requirements can usually be related to one of these elements. In particular, there are &lt;br /&gt;
# data requirements related to the values of a single property (column)&lt;br /&gt;
# data requirements related to the values of multiple properties within an instance (multiple columns in a row)&lt;br /&gt;
# data requirements related to the instances of a whole class (table)&lt;br /&gt;
# data requirements related to the ontology elements (schema)&lt;br /&gt;
&lt;br /&gt;
With the DQM-Vocabulary, you can model the first three types of requirements. Schema/ontology requirements are currently not part of the vocabulary, but may be added in future releases. In the following, we explain how Property-, Multi-Property-, Class-, and Custom-Requirements can be modelled with the current version of the DQM-Vocabulary.&lt;br /&gt;
&lt;br /&gt;
==Define Tested Elements==&lt;br /&gt;
Before you can use your data with the DQM-Vocabulary, you have to declare the elements of your ontology that shall be used in the DQM-Vocabulary. You have two options to do this with impact on decidablility of potential reasoning with your knowledge base:&lt;br /&gt;
&lt;br /&gt;
=== Design Option 1: Classes and Properties as Instances (OWL Full) ===&lt;br /&gt;
Classes and properties that shall be tested for data requirement violations are defined as direct instances of the classes [[dqm:TestedClass]] or [[dqm:TestedProperty]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:MyClass a dqm:TestedClass&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:MyProperty a dqm:TestedProperty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;'''Attention:'''&amp;lt;/span&amp;gt; This will make your knowledge base OWL Full which is potentially not useful if you plan to use reasoning.&lt;br /&gt;
&lt;br /&gt;
=== Design Option 2: Mapping of Classes and Properties to new URIs (OWL DL) ===&lt;br /&gt;
Classes and properties that shall be tested for data requirement violations are mapped to new instances of the classes [[dqm:TestedClass]] and [[dqm:TestedProperty]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Class_1 a dqm:TestedClass&lt;br /&gt;
                dqm:hasURI &amp;quot;http://www.example.org/MyClass&amp;quot;^^xsd:anyURI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Property_1 a dqm:TestedProperty&lt;br /&gt;
                dqm:hasURI &amp;quot;http://www.example.org/MyProperty&amp;quot;^^xsd:anyURI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples of Data Requirements ==&lt;br /&gt;
&lt;br /&gt;
=== Sample Dataset used in Examples ===&lt;br /&gt;
The following examples use classes and properties from our sample dataset as [[dqm:TestedClass]] and [[dqm:TestedProperties]]. Requirements specified in OWL DL will use the mapped instances, while requirements specified in OWL Full will use the original classes and properties. The data set contains the following classes:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Original Class!!Mapped Instance&lt;br /&gt;
|-&lt;br /&gt;
|foo:Location||foo:Class_Location&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
...with the following datatype properties:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Original Property !! Mapped Instance&lt;br /&gt;
|-&lt;br /&gt;
|foo:LOCID ||foo:Prop_Location_ID&lt;br /&gt;
|-&lt;br /&gt;
|foo:STREET||foo:Prop_Location_Street&lt;br /&gt;
|-&lt;br /&gt;
|foo:STREETNO||foo:Prop_Location_Streetno&lt;br /&gt;
|-&lt;br /&gt;
|foo:ZIP||foo:Prop_Location_ZIP&lt;br /&gt;
|-&lt;br /&gt;
|foo:CITY||foo:Prop_Location_City&lt;br /&gt;
|-&lt;br /&gt;
|foo:COUNTRY||foo:Prop_Location_Country&lt;br /&gt;
|-&lt;br /&gt;
|foo:STATE||foo:Prop_Location_State&lt;br /&gt;
|-&lt;br /&gt;
|foo:validThrough||foo:Prop_validThrough&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to apply the example to your own data, you need to exchange the sample classes and properties used in the data requirements by your own.&lt;br /&gt;
&lt;br /&gt;
===Example 1: PropertyCompletenessRule===&lt;br /&gt;
A property completeness rule is a data requirement that specifies that a certain property and/or its value must exist in all instances of a certain class.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a specific property and/or its values must exist for all instances of a specific class.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:COUNTRY must exist and have a value in all instances of the class foo:Location.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:MissingPropertyAndValue]] [[dqm:MissingProperty]] [[dqm:MissingValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyCompleteness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you defined your data elements in OWL Full ([[#Option 1: Classes and Properties as Instances (OWL Full)|Option 1]]), then you can simply use the URIs of your ontology in the definition of the Property Completeness Rule as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Definition in OWL Full'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:PropertyCompletenessRule_1&lt;br /&gt;
      a       dqm:PropertyCompletenessRule ;&lt;br /&gt;
      dqm:testedClass http://www.example.org/MyClass ;&lt;br /&gt;
      dqm:testedProperty1 http://www.example.org/MyProperty ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 1.1: Property Completeness Violations (OWL Full Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The property [[dqm:requiredProperty]] specifies that the property &amp;quot;MyProperty&amp;quot; must exist in each instance. The property [[dqm:requiredValue]] specifies that a value must exist for property &amp;quot;MyProperty&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you mapped your own ontology elements to new URIs ([[#Option 2: Mapping of Classes and Properties to new URIs (OWL DL)|Option 2]], OWL DL), then the following example will help you to define a Property Completeness Rule:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Definition in OWL-DL'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:PropertyCompletenessRule_1&lt;br /&gt;
      a       dqm:PropertyCompletenessRule ;&lt;br /&gt;
      dqm:testedClass foo:Class_1 ;&lt;br /&gt;
      dqm:testedProperty1 foo:Property_1 ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 1.2: Property Completeness Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The property [[dqm:requiredProperty]] specifies that the property &amp;quot;MyProperty&amp;quot; which is mapped to &amp;quot;foo:Property_1&amp;quot; must exist in each instance of the class &amp;quot;MyClass&amp;quot; which is mapped to &amp;quot;foo:Class_1&amp;quot;. The property [[dqm:requiredValue]] specifies that also a value must exist for property &amp;quot;foo:Property_1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Example 2: Conditional Property Completeness Rule (1 Condition, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a specific property and/or its values must exist if another property obtains a specific value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:STATE must exist and have a value in all instances of the class foo:Location that have value &amp;quot;USA&amp;quot; for the property foo:COUNTRY.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:MissingPropertyAndValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyCompleteness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To define this data requirement, you must perform the following two steps:&lt;br /&gt;
&lt;br /&gt;
'''1. Define the Condition'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Condition_USA&lt;br /&gt;
      a       dqm:Condition ;&lt;br /&gt;
      rdfs:label &amp;quot;Condition USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:conditionalProperty foo:Prop_Location_Country ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2. Define the Conditional Property Completeness Rule'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ConditionalPropertyCompletenessRule_State&lt;br /&gt;
      a       dqm:ConditionalPropertyCompletenessRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Conditional property completeness rule State&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 2: Conditional Property Completeness Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 3: Syntax Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a specific property must obtain a specific syntax.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:ZIP must contain values with exactly five digits.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:SyntaxViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify syntax requirements by creating an instance of the class [[dqm:SyntaxRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:SyntaxRule_ZIP&lt;br /&gt;
      a       dqm:SyntaxRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Syntax rule ZIP&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:regex &amp;quot;^[0-9]{5}$&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Property_ZIP .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Generate_Problem_Reports#Example 3: Syntax Rule Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 4:  Conditional Syntax Rule (1 Condition, OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a specific property must obtain a specific syntax if another property obtains a specific value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:STATE must contain a value with two letters if the property foo:COUNTRY has the value &amp;quot;USA&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:SyntaxViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify a conditional syntax rule, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
'''1.Define Condition'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Condition_USA&lt;br /&gt;
      a       dqm:Condition ;&lt;br /&gt;
      rdfs:label &amp;quot;Condition USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:conditionalProperty foo:Prop_Location_Country ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2.Define Conditional Syntax Rule'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ConditionalSyntaxRule_State&lt;br /&gt;
      a       dqm:ConditionalSyntaxRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Conditional syntax rule State&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:regex &amp;quot;^[A-Z]{2}$&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5: Legal Value Range Rule (OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify valid value ranges for properties that hold numeric values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a product data set, the property foo:PRICE can never contain negative values.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutOfRangeValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify a legal value range for a property by adding the following instance data to the class [[dqm:LegalValueRangeRule]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:LegalValueRangeRule_Price&lt;br /&gt;
      a       dqm:LegalValueRangeRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Legal value range rule Price&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:lowerLimit &amp;quot;0.00&amp;quot;^^xsd:float ;&lt;br /&gt;
      dqm:testedClass foo:Class_Product ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Product_Price .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The class [[dqm:LegalValueRangeRule]] has the special properties&lt;br /&gt;
* [[dqm:lowerLimit]]&lt;br /&gt;
* [[dqm:upperLimit]]&lt;br /&gt;
&lt;br /&gt;
to specify the lowest and/or highest allowed value.&lt;br /&gt;
&lt;br /&gt;
===Example 6: Legal Value Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify a reference property that holds the allowed values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:COUNTRY can only contain values of the trusted property foo:legalValue in the trusted class foo:LegalValueCountry.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:IllegalValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify legal values for a specific property, you need to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Create a reference data set or use an existing data set that holds the legal values &lt;br /&gt;
# Specify the class and property which hold the legal values as [[dqm:TrustedClass]] and [[dqm:TrustedProperty]]&lt;br /&gt;
# Create an instance of [[dqm:LegalValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:LegalValueRule_Country&lt;br /&gt;
      a       dqm:LegalValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Legal value rule Country&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:referenceClass foo:TrustedClass_LegalValueCountry ;&lt;br /&gt;
      dqm:referenceProperty1 foo:TrustedProperty_LegalValue ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_Country .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 7: Unique Value Rule (OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a property must be unique.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:LOCID of class foo:Location must only contain unique values.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:UniquenessViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyUniqueness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify that values of a property must be unique by creating an instance of the class [[dqm:UniqueValueRule]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:UniqueValueRule_LOCID&lt;br /&gt;
      a       dqm:UniqueValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Unique value rule LOCID&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_ID .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 8: Functional Dependency Value Rule (1 Condition, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a value of one property must obtain a specific value if a second property has a certain value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In an address data set, the city name &amp;quot;New York&amp;quot; must always have the value &amp;quot;USA&amp;quot; for the property foo:COUNTRY.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:FunctionalDependencyViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SemanticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify the dependency between two property values, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Define a condition under which a specific value is always required. &lt;br /&gt;
# Create an instance of the class [[dqm:FuncDepValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:FuncDepValueRule_1&lt;br /&gt;
      a       dqm:FuncDepValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Func dep value rule 1&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_New_York ;&lt;br /&gt;
      dqm:reqDescription &amp;quot;If the city value is \&amp;quot;New York\&amp;quot; then the country must be     &lt;br /&gt;
                         \&amp;quot;USA\&amp;quot;.&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_Country .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 9: Functional Dependency Value Rule (2 Conditions, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a value of one property must obtain a specific value if a second and third property have specific values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In an address data set, the city &amp;quot;New York&amp;quot; in the country &amp;quot;USA&amp;quot; must always have the value &amp;quot;NY&amp;quot; for the property foo:STATE.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:FunctionalDependencyViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SemanticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify the dependency between three property values, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Define both conditions under which a specific value is always required. &lt;br /&gt;
# Create an instance of the class [[dqm:FuncDepValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:FuncDepValueRule_2&lt;br /&gt;
      a       dqm:FuncDepValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Func dep value rule 2&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:equals &amp;quot;NY&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:hasCondition2 foo:Condition_New_York ;&lt;br /&gt;
      dqm:reqDescription &amp;quot;If the city value is \&amp;quot;New York\&amp;quot; and the country value is &lt;br /&gt;
                         \&amp;quot;USA\&amp;quot; then the state must be \&amp;quot;NY\&amp;quot;.&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 10: Expiry Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that instances of a specific class expire.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a product data set, the class foo:Product has instances with product offerings that expire on a certain date which is specified via the property foo:validThrough.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutdatedInstance]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:Timeliness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:ClassRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify that instances of a class have an expiry date by creating an instance of class [[dqm:ExpiryRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ExpiryRule_1&lt;br /&gt;
      a       dqm:ExpiryRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Expiry rule 1&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Product ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Product_validThrough .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 11: Expiry Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that instances of a specific class must be updated within a specified interval.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the class foo:Location has instances with address data that have timestamps of the last update. The instances shall not be elder than 1 year 2 months 3 days 5 hours 20 minutes and 30.123 seconds.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutdatedInstance]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:Timeliness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:ClassRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify a required update interval for instances of a specific property by creating an instance of class [[dqm:UpdateRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:UpdateRule_Location&lt;br /&gt;
      a       dqm:UpdateRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Update rule Location&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:expectedUpdateInterval &amp;quot;P1Y2M3DT5H20M30.123S&amp;quot;^^xsd:duration ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_timestamp .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''NOTE:'''&amp;lt;/span&amp;gt; The tested class must have a property that holds the time of the last update in order to be able to specify this requirement.&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	<entry>
		<id>http://semwebquality.org/mediawiki/index.php?title=Create_Data_Requirements</id>
		<title>Create Data Requirements</title>
		<link rel="alternate" type="text/html" href="http://semwebquality.org/mediawiki/index.php?title=Create_Data_Requirements"/>
				<updated>2011-10-20T20:23:13Z</updated>
		
		<summary type="html">&lt;p&gt;Cfuerber: /* Example 1: PropertyCompletenessRule */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;This site is currently under construction!&amp;lt;/span&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== What are Data Requirements? ==&lt;br /&gt;
&lt;br /&gt;
Data requirements are prescribed directives or consensual agreements that define the content and/or structure that constitute high quality data instances and values. Data requirements can thereby be stated by several different individuals or groups of individuals. Moreover, data requirments may also be based on laws, standards, or other directives. They may be agreed upon or contrary to each other.&lt;br /&gt;
&lt;br /&gt;
However, data requirements are required as a prerequisite to measure data quality. Hence, they serve as a benchmark that defines the desired state of data. In the following, we describe how you can express your data requirements via the DQM-Vocabulary.&lt;br /&gt;
&lt;br /&gt;
== Types of Data Requirements ==&lt;br /&gt;
&lt;br /&gt;
Data requirements usually refer to different data items. When we look at a table we usually have at least four types of data items, (1) columns, (2) rows, (3) schemata, and (4) the table/spreadsheet itself. &lt;br /&gt;
&lt;br /&gt;
[[File:Terminology.png|500px|Table to illustrate used terminology]]&lt;br /&gt;
&lt;br /&gt;
In Semantic Web environments, we can compare columns to properties, rows to instances, schemata to ontologies, and tables to classes. Data requirements can usually be related to one of these elements. In particular, there are &lt;br /&gt;
# data requirements related to the values of a single property (column)&lt;br /&gt;
# data requirements related to the values of multiple properties within an instance (multiple columns in a row)&lt;br /&gt;
# data requirements related to the instances of a whole class (table)&lt;br /&gt;
# data requirements related to the ontology elements (schema)&lt;br /&gt;
&lt;br /&gt;
With the DQM-Vocabulary, you can model the first three types of requirements. Schema/ontology requirements are currently not part of the vocabulary, but may be added in future releases. In the following, we explain how Property-, Multi-Property-, Class-, and Custom-Requirements can be modelled with the current version of the DQM-Vocabulary.&lt;br /&gt;
&lt;br /&gt;
==Define Tested Elements==&lt;br /&gt;
Before you can use your data with the DQM-Vocabulary, you have to declare the elements of your ontology that shall be used in the DQM-Vocabulary. You have two options to do this with impact on decidablility of potential reasoning with your knowledge base:&lt;br /&gt;
&lt;br /&gt;
=== Design Option 1: Classes and Properties as Instances (OWL Full) ===&lt;br /&gt;
Classes and properties that shall be tested for data requirement violations are defined as direct instances of the classes [[dqm:TestedClass]] or [[dqm:TestedProperty]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:MyClass a dqm:TestedClass&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:MyProperty a dqm:TestedProperty&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red;&amp;quot;&amp;gt;'''Attention:'''&amp;lt;/span&amp;gt; This will make your knowledge base OWL Full which is potentially not useful if you plan to use reasoning.&lt;br /&gt;
&lt;br /&gt;
=== Design Option 2: Mapping of Classes and Properties to new URIs (OWL DL) ===&lt;br /&gt;
Classes and properties that shall be tested for data requirement violations are mapped to new instances of the classes [[dqm:TestedClass]] and [[dqm:TestedProperty]].&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Class_1 a dqm:TestedClass&lt;br /&gt;
                dqm:hasURI &amp;quot;http://www.example.org/MyClass&amp;quot;^^xsd:anyURI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Property_1 a dqm:TestedProperty&lt;br /&gt;
                dqm:hasURI &amp;quot;http://www.example.org/MyProperty&amp;quot;^^xsd:anyURI&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Examples of Data Requirements ==&lt;br /&gt;
&lt;br /&gt;
=== Sample Dataset used in Examples ===&lt;br /&gt;
The following examples use classes and properties from our sample dataset as [[dqm:TestedClass]] and [[dqm:TestedProperties]]. Requirements specified in OWL DL will use the mapped instances, while requirements specified in OWL Full will use the original classes and properties. The data set contains the following classes:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Original Class!!Mapped Instance&lt;br /&gt;
|-&lt;br /&gt;
|foo:Location||foo:Class_Location&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
...with the following datatype properties:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Original Property !! Mapped Instance&lt;br /&gt;
|-&lt;br /&gt;
|foo:LOCID ||foo:Prop_Location_ID&lt;br /&gt;
|-&lt;br /&gt;
|foo:STREET||foo:Prop_Location_Street&lt;br /&gt;
|-&lt;br /&gt;
|foo:STREETNO||foo:Prop_Location_Streetno&lt;br /&gt;
|-&lt;br /&gt;
|foo:ZIP||foo:Prop_Location_ZIP&lt;br /&gt;
|-&lt;br /&gt;
|foo:CITY||foo:Prop_Location_City&lt;br /&gt;
|-&lt;br /&gt;
|foo:COUNTRY||foo:Prop_Location_Country&lt;br /&gt;
|-&lt;br /&gt;
|foo:STATE||foo:Prop_Location_State&lt;br /&gt;
|-&lt;br /&gt;
|foo:validThrough||foo:Prop_validThrough&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to apply the example to your own data, you need to exchange the sample classes and properties used in the data requirements by your own.&lt;br /&gt;
&lt;br /&gt;
===Example 1: PropertyCompletenessRule===&lt;br /&gt;
A property completeness rule is a data requirement that specifies that a certain property and/or its value must exist in all instances of a certain class.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a specific property and/or its values must exist for all instances of a specific class.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:COUNTRY must exist and have a value in all instances of the class foo:Location.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:MissingPropertyAndValue]] [[dqm:MissingProperty]] [[dqm:MissingValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyCompleteness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If you defined your data elements in OWL Full ([[#Option 1: Classes and Properties as Instances (OWL Full)|Option 1]]), then you can simply use the URIs of your ontology in the definition of the Property Completeness Rule as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Definition in OWL Full'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:PropertyCompletenessRule_1&lt;br /&gt;
      a       dqm:PropertyCompletenessRule ;&lt;br /&gt;
      dqm:testedClass http://www.example.org/MyClass ;&lt;br /&gt;
      dqm:testedProperty1 http://www.example.org/MyProperty ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 1.1: Property Completeness Violations (OWL Full Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The property [[dqm:requiredProperty]] specifies that the property &amp;quot;MyProperty&amp;quot; must exist in each instance. The property [[dqm:requiredValue]] specifies that a value must exist for property &amp;quot;MyProperty&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you mapped your own ontology elements to new URIs ([[#Option 2: Mapping of Classes and Properties to new URIs (OWL DL)|Option 2]], OWL DL), then the following example will help you to define a Property Completeness Rule:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Definition in OWL-DL'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:PropertyCompletenessRule_1&lt;br /&gt;
      a       dqm:PropertyCompletenessRule ;&lt;br /&gt;
      dqm:testedClass foo:Class_1 ;&lt;br /&gt;
      dqm:testedProperty1 foo:Property_1 ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 1.2: Property Completeness Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The property [[dqm:requiredProperty]] specifies that the property &amp;quot;MyProperty&amp;quot; which is mapped to &amp;quot;foo:Property_1&amp;quot; must exist in each instance of the class &amp;quot;MyClass&amp;quot; which is mapped to &amp;quot;foo:Class_1&amp;quot;. The property [[dqm:requiredValue]] specifies that also a value must exist for property &amp;quot;foo:Property_1&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Example 2: Conditional Property Completeness Rule (1 Condition, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a specific property must exist if another property obtains a specific value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:STATE must exist and have a value in all instances of the class foo:Location that have value &amp;quot;USA&amp;quot; for the property foo:COUNTRY.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:MissingPropertyAndValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyCompleteness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To define this data requirement, you must perform the following two steps:&lt;br /&gt;
&lt;br /&gt;
'''1. Define the Condition'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Condition_USA&lt;br /&gt;
      a       dqm:Condition ;&lt;br /&gt;
      rdfs:label &amp;quot;Condition USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:conditionalProperty foo:Prop_Location_Country ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2. Define the Conditional Property Completeness Rule'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ConditionalPropertyCompletenessRule_State&lt;br /&gt;
      a       dqm:ConditionalPropertyCompletenessRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Conditional property completeness rule State&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:requiredProperty &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:requiredValue &amp;quot;true&amp;quot;^^xsd:boolean ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Generate_Problem_Reports#Example 2: Conditional Property Completeness Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 3: Syntax Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a specific property must obtain a specific syntax.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:ZIP must contain values with exactly five digits.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:SyntaxViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify syntax requirements by creating an instance of the class [[dqm:SyntaxRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:SyntaxRule_ZIP&lt;br /&gt;
      a       dqm:SyntaxRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Syntax rule ZIP&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:regex &amp;quot;^[0-9]{5}$&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Property_ZIP .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Generate_Problem_Reports#Example 3: Syntax Rule Violations (OWL DL Design)|Click here to learn how to generate a problem report from this]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 4:  Conditional Syntax Rule (1 Condition, OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a specific property must obtain a specific syntax if another property obtains a specific value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:STATE must contain a value with two letters if the property foo:COUNTRY has the value &amp;quot;USA&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:SyntaxViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify a conditional syntax rule, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
'''1.Define Condition'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:Condition_USA&lt;br /&gt;
      a       dqm:Condition ;&lt;br /&gt;
      rdfs:label &amp;quot;Condition USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:conditionalProperty foo:Prop_Location_Country ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''2.Define Conditional Syntax Rule'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ConditionalSyntaxRule_State&lt;br /&gt;
      a       dqm:ConditionalSyntaxRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Conditional syntax rule State&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:regex &amp;quot;^[A-Z]{2}$&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 5: Legal Value Range Rule (OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify valid value ranges for properties that hold numeric values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a product data set, the property foo:PRICE can never contain negative values.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutOfRangeValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify a legal value range for a property by adding the following instance data to the class [[dqm:LegalValueRangeRule]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:LegalValueRangeRule_Price&lt;br /&gt;
      a       dqm:LegalValueRangeRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Legal value range rule Price&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:lowerLimit &amp;quot;0.00&amp;quot;^^xsd:float ;&lt;br /&gt;
      dqm:testedClass foo:Class_Product ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Product_Price .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The class [[dqm:LegalValueRangeRule]] has the special properties&lt;br /&gt;
* [[dqm:lowerLimit]]&lt;br /&gt;
* [[dqm:upperLimit]]&lt;br /&gt;
&lt;br /&gt;
to specify the lowest and/or highest allowed value.&lt;br /&gt;
&lt;br /&gt;
===Example 6: Legal Value Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify a reference property that holds the allowed values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:COUNTRY can only contain values of the trusted property foo:legalValue in the trusted class foo:LegalValueCountry.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:IllegalValue]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SyntacticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify legal values for a specific property, you need to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Create a reference data set or use an existing data set that holds the legal values &lt;br /&gt;
# Specify the class and property which hold the legal values as [[dqm:TrustedClass]] and [[dqm:TrustedProperty]]&lt;br /&gt;
# Create an instance of [[dqm:LegalValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:LegalValueRule_Country&lt;br /&gt;
      a       dqm:LegalValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Legal value rule Country&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:referenceClass foo:TrustedClass_LegalValueCountry ;&lt;br /&gt;
      dqm:referenceProperty1 foo:TrustedProperty_LegalValue ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_Country .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 7: Unique Value Rule (OWL DL)===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that values of a property must be unique.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the property foo:LOCID of class foo:Location must only contain unique values.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:UniquenessViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:PropertyUniqueness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:PropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify that values of a property must be unique by creating an instance of the class [[dqm:UniqueValueRule]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:UniqueValueRule_LOCID&lt;br /&gt;
      a       dqm:UniqueValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Unique value rule LOCID&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_ID .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 8: Functional Dependency Value Rule (1 Condition, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a value of one property must obtain a specific value if a second property has a certain value.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In an address data set, the city name &amp;quot;New York&amp;quot; must always have the value &amp;quot;USA&amp;quot; for the property foo:COUNTRY.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:FunctionalDependencyViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SemanticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify the dependency between two property values, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Define a condition under which a specific value is always required. &lt;br /&gt;
# Create an instance of the class [[dqm:FuncDepValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:FuncDepValueRule_1&lt;br /&gt;
      a       dqm:FuncDepValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Func dep value rule 1&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:equals &amp;quot;USA&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_New_York ;&lt;br /&gt;
      dqm:reqDescription &amp;quot;If the city value is \&amp;quot;New York\&amp;quot; then the country must be     &lt;br /&gt;
                         \&amp;quot;USA\&amp;quot;.&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_Country .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 9: Functional Dependency Value Rule (2 Conditions, OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that a value of one property must obtain a specific value if a second and third property have specific values.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In an address data set, the city &amp;quot;New York&amp;quot; in the country &amp;quot;USA&amp;quot; must always have the value &amp;quot;NY&amp;quot; for the property foo:STATE.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:FunctionalDependencyViolation]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:SemanticAccuracy]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:MultiPropertyRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order to specify the dependency between three property values, you must perform the following steps:&lt;br /&gt;
&lt;br /&gt;
# Define both conditions under which a specific value is always required. &lt;br /&gt;
# Create an instance of the class [[dqm:FuncDepValueRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:FuncDepValueRule_2&lt;br /&gt;
      a       dqm:FuncDepValueRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Func dep value rule 2&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:equals &amp;quot;NY&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:hasCondition1 foo:Condition_USA ;&lt;br /&gt;
      dqm:hasCondition2 foo:Condition_New_York ;&lt;br /&gt;
      dqm:reqDescription &amp;quot;If the city value is \&amp;quot;New York\&amp;quot; and the country value is &lt;br /&gt;
                         \&amp;quot;USA\&amp;quot; then the state must be \&amp;quot;NY\&amp;quot;.&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_State .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 10: Expiry Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that instances of a specific class expire.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a product data set, the class foo:Product has instances with product offerings that expire on a certain date which is specified via the property foo:validThrough.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutdatedInstance]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:Timeliness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:ClassRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify that instances of a class have an expiry date by creating an instance of class [[dqm:ExpiryRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:ExpiryRule_1&lt;br /&gt;
      a       dqm:ExpiryRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Expiry rule 1&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:testedClass foo:Class_Product ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Product_validThrough .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Example 11: Expiry Rule (OWL DL)===&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|'''Task:'''||Specify that instances of a specific class must be updated within a specified interval.&lt;br /&gt;
|-&lt;br /&gt;
|'''Notional Example:'''||In a location data set, the class foo:Location has instances with address data that have timestamps of the last update. The instances shall not be elder than 1 year 2 months 3 days 5 hours 20 minutes and 30.123 seconds.&lt;br /&gt;
|-&lt;br /&gt;
|'''DQ-Problem:'''|| [[dqm:OutdatedInstance]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Dimension:'''||[[dqm:Timeliness]]&lt;br /&gt;
|-&lt;br /&gt;
|'''Requirement Type:'''||[[dqm:ClassRequirement]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can specify a required update interval for instances of a specific property by creating an instance of class [[dqm:UpdateRule]], e.g. as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
foo:UpdateRule_Location&lt;br /&gt;
      a       dqm:UpdateRule ;&lt;br /&gt;
      rdfs:label &amp;quot;Update rule Location&amp;quot;^^xsd:string ;&lt;br /&gt;
      dqm:expectedUpdateInterval &amp;quot;P1Y2M3DT5H20M30.123S&amp;quot;^^xsd:duration ;&lt;br /&gt;
      dqm:testedClass foo:Class_Location ;&lt;br /&gt;
      dqm:testedProperty1 foo:Prop_Location_timestamp .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;'''NOTE:'''&amp;lt;/span&amp;gt; The tested class must have a property that holds the time of the last update in order to be able to specify this requirement.&lt;/div&gt;</summary>
		<author><name>Cfuerber</name></author>	</entry>

	</feed>