Size: 6149
Comment:
|
Size: 6217
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 7: | Line 7: |
Als Test-RDF-Satz haben wir (freebase ????) genommen. | |
Line 17: | Line 16: |
=== Installation von SparqlEngineDraft: === 1. [[https://code.google.com/p/rdf3x/downloads/list|Klonen]] 2. [[https://github.com/Buchhold/SparqlEngineDraft#1-build|Anweisungen]] befolgen. |
|
Line 18: | Line 20: |
Um den Datensatz in die beide Stores laden zu können, musste dieser Satz in einen für RDF-Speicherung gängigen Format umgewandelt werden. Ausgewählt wurde "*.nt"-Format. Der ursprünglicher Satz enthielt Values und Enteties. Values waren schon nt-conform, die dagegen Eneteties mussten umgewandelt werden. Dafür wurde ein kleiner Research gemacht, dessen Ergebnisse [[https://docs.google.com/document/d/1n3p-lpQdCB-2dCIqqAJUC6s5RG01e_y6Fp1xLRbY5HU/edit?usp=sharing|hier]] zusammengefasst wurden. Schlussendlich wurde entschieden aus den Enteties [[http://www.w3.org/TeamSubmission/turtle/#sec-uris|UriRefs]] zu machen. Dafür wurden die Enteties in die eckigen Klammer gesetzt und die unzulässige Zeichen durch die entsprechende Prozent-Kodierungen ersetzt. Die Ersetzungsregeln entsprechen denen von [[http://wiki.dbpedia.org/URIencoding|DBpedia 3.7]]. Als nächstes musste der konvertierter Datensatz in die beiden RDF-Stores geladen werden. |
Um den Datensatz in die Triple Stores laden zu können, musste dieser Satz in einen für RDF-Speicherung gängigen Format umgewandelt werden. Ausgewählt wurde "*.nt"-Format. Der ursprünglicher Satz enthielt Values und Enteties. Values waren schon nt-conform, die Enteties mussten umgewandelt werden. Dafür wurden die Enteties in die eckigen Klammer gesetzt und die unzulässige Zeichen durch die entsprechende Prozent-Kodierungen oder auch von uns defenierten Ersatzzeichen ersetzt. === Ersetzungstabelle: === || % |||| < |||| > |||| \ |||| ^ |||| ` |||| space || || %25 |||| %3C |||| %3E |||| %5C |||| %5E |||| %60 |||| _ || Z.B.: '' Mikel Jackson --> <Mikel_Jackson> '' |
Line 22: | Line 31: |
Datenladen in den Virtuoso wurde mit [[http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtBulkRDFLoader|Bulk loading process]] gemacht. Bei diesem Prozess muss der Name des RDF-Graphen als graph_iri eingegeben werden. Unter dieser Namen ist der RDF-Satz bei Virtuoso erreichbar und man benutzt graph_iri als prefix bei jeder Entety, wenn man eine Spqrql-Anfrage an den Store erstellt. | Datenladen in den Virtuoso wurde mit [[http://virtuoso.openlinksw.com/dataspace/doc/dav/wiki/Main/VirtBulkRDFLoader|Bulk loading process]] durchgefuhrt. Bei diesem Prozess muss der Name des RDF-Graphen als graph_iri eingegeben werden. Unter dieser Namen ist der RDF-Satz bei Virtuoso erreichbar und man benutzt graph_iri als prefix bei jeder Entety, wenn man eine Spqrql-Anfrage an den Store erstellt. |
Line 24: | Line 33: |
Z.B.: '' 'Mikel%20Jackson' --> '<http://foo/Mikel%20Jackson>' '' | Z.B.: '' Mikel Jackson --> '<http://foo/Mikel_Jackson>' '' |
Line 27: | Line 36: |
Das Datenladen in den Rdf3x-Store erfolgt durch einen Skript ''<Installationsordner von Rdf3x>/bin/rdf3xload <DB-Name> <RDF-Satz-Pfad>''. Das wars! Bei der Nfragestellung muss man keinen zusätzlichen Prefix eingeben. | Das Datenladen in den Rdf3x-Store erfolgt durch einen Skript ''<Installationsordner von Rdf3x>/bin/rdf3xload <DB-Name> <RDF-Satz-Pfad>''. Kein zusatzlicher Prefix ist bei der Afragestellung erforderlich. |
Line 29: | Line 38: |
Z.B.: '' 'Mikel%20Jackson' --> '<Mikel%20Jackson>' '' | Z.B.: '' Mikel Jackson --> '<Mikel_Jackson>' '' |
Line 31: | Line 40: |
=== Data Import SparqlEngineDraft: === [[https://github.com/Buchhold/SparqlEngineDraft#2-creating-an-index|Anweisungen]] befolgen. Kein zusatzlicher Prefix ist bei der Afragestellung erforderlich. Z.B.: '' Mikel Jackson --> '<Mikel_Jackson>' '' |
|
Line 33: | Line 46: |
|| '''RDF-Store'''|||| '''Ladezeit'''|| || Virtuoso |||| 1170 min|| || Rdf3x|||| noch nicht gemessen, aber deutlich weniger als bei Virtuoso|| |
Die Größe des Input-RDF-Sets in der NT-Format beträgt 17 GB. || '''RDF-Store'''|||| '''Ladezeit'''|||| '''Indexgroße auf der Festplatte''' || '''Indexgroße in der Arbeitspeicher''' || || Virtuoso |||| 1170 min|||| ? |||| ? || || Rdf3x |||| 76 min |||| 12 GB |||| ? || || SparqlEngineDraft |||| 26 min |||| 14.2 GB |||| 3.5 GB || |
Line 75: | Line 92: |
'''Getestete Anfragen:''' | === Tests === |
Line 77: | Line 94: |
'''Query 1''' | '''Zeilenformat:''' ''<time> (number of lines in result)'' |
Line 79: | Line 96: |
''SELECT * WHERE {'' | || '''Query \ RDF Store''' |||| '''rdf3x''' |||| '''SparqlEngineDraft''' || || '''Query 1''' |||| 0.581ms(1) |||| 13.827ms(1) || || '''Query 2''' |||| 17.632ms(5162) |||| 10.568ms(5162) || || '''Query 3''' |||| 98.772ms(1579) |||| 57.344ms(1579) || || '''Query 4''' |||| 22.731ms(9767) |||| 16.673ms(9767) || || '''Query 5''' |||| 5.030ms(4) |||| 239.383ms(4) || || '''Query 6''' |||| 65.057ms(0) |||| 72.879ms(0) || || '''Query 7''' |||| 28.483ms(3697) |||| 30.418ms(3697) || || '''Query 8''' |||| 9.559ms(164) |||| 21.509ms(164) || || '''Query 9''' |||| 0.501ms(128) |||| 2.319ms(128) || || '''Query 10''' |||| 476.191ms(1528) |||| 314.789ms(1528) || |
Line 81: | Line 108: |
'' <The%20Format%20(Musical%20Recording)%20%231> ?b ?c'' | ''' Queries ''' |
Line 83: | Line 110: |
''}'' | ''' Query 1 ''' |
Line 85: | Line 112: |
'''Query 2''' | '' SELECT ?x WHERE { '' '' ?x <is-a> <Book> . '' '' ?x <Author> <Anthony_Newman_(Author)> '' '' } '' |
Line 87: | Line 117: |
''SELECT * WHERE {'' | ''' Query 2 ''' |
Line 89: | Line 119: |
'' ?a <Length> ?c . FILTER (?c>100)'' | '' SELECT ?x WHERE { '' '' ?x <Genre> <Comedy> . ?x <is-a> <Award-Nominated_Work> . ?x <is-a> <Film> . '' '' } '' |
Line 91: | Line 123: |
''}'' | ''' Query 3 ''' |
Line 93: | Line 125: |
'''Query 3''' | '' SELECT ?x WHERE { '' '' ?x <is-a> <Politician> . ?x <Film_performance> ?y . ?y <Genre> <Comedy> . '' '' } '' |
Line 95: | Line 129: |
''SELECT * WHERE {'' | ''' Query 4 ''' |
Line 97: | Line 131: |
'' ?x <Release> <Technodrome,%20Volume%202%20(Consumer%20product)> .'' | '' SELECT ?x WHERE { '' '' ?x <is-a> <Olympic_athlete> . ?x <is-a> <Deceased_Person> '' '' } '' |
Line 99: | Line 135: |
'' ?x <is-a> <Canonical%20Version> .'' | ''' Query 5 ''' |
Line 101: | Line 137: |
'' ?x <is-a> <Musical%20Recording> .'' | '' SELECT ?x WHERE { '' '' ?x <Release> <Technodrome,_Volume_2_(Consumer_product)> . '' '' ?x <is-a> <Canonical_Version> . '' '' ?x <is-a> <Musical_Recording> . '' '' } '' |
Line 103: | Line 143: |
''} LIMIT 1000'' | ''' Query 6 ''' |
Line 105: | Line 145: |
'''Query 4''' | '' SELECT ?x ?y WHERE { '' '' ?x <is-a> <Person> . ?x <Country_of_nationality> <Germany> . ?x <Author> ?y . ?y <is-a> <Award-Nominated_Work> '' '' } '' |
Line 107: | Line 149: |
''SELECT * WHERE {'' | ''' Query 7 ''' |
Line 109: | Line 151: |
'' ?a <is-a> ?c .'' | '' SELECT ?x WHERE { '' '' ?x <is-a> <Politician> . ?x <Parent> ?y . ?x <Parent> ?z . ?y <is-a> <Politician> . ?z <is-a> <Politician> . '' '' } '' |
Line 111: | Line 155: |
'' ?c <is-a> ?e .'' | ''' Query 8 ''' |
Line 113: | Line 157: |
''} LIMIT 1000'' | '' SELECT ?x ?y WHERE{ ?x <is-a> <Monarch> . ?x <is-a> <Deceased_Person> .?x <Cause_of_death> <Assassination> . ?x <Place_of_birth> ?y } '' |
Line 115: | Line 159: |
'''Query 5''' | ''' Query 9 ''' |
Line 117: | Line 161: |
''SELECT * WHERE {'' | '' SELECT ?x WHERE{ ?x <is-a> <Lake> . ?x <Contained_by> <Russia> } '' |
Line 119: | Line 163: |
'' ?a <is-a> ?c .'' | ''' Query 10 ''' |
Line 121: | Line 165: |
'' ?c <is-a> ?e .'' ''}'' '''Query 6''' ''SELECT COUNT(*) WHERE {'' '' ?a <is-a> ?c .'' '' ?c <is-a> ?e .'' ''}'' '''Query 7''' ''SELECT COUNT(*) WHERE {'' '' ?a ?b ?c .'' ''}'' === Ergebnisse === '''Zeilenformat:''' ''<average time> (<1. loop time>/<2. loop time>/<3. loop time>) ms <number of lines in result> Lines'' || |||| '''rdf3x''' |||| '''virtuoso''' || || '''Query 1''' |||| 6 (6/5/6) ms 6 Lines |||| 22 (46/10/10) ms 6 Lines || || '''Query 2''' |||| 73088 (70397/73129/75740) ms 8923358 Lines ||||119289 (117564/119475/120828) ms 8282272 Lines || || '''Query 3''' |||| 16 (18/14/18) ms 4 Lines |||| 35 (49/48/10) ms 4 Lines || || '''Query 4''' |||| 11 (13/10/10) ms 1000 Lines |||| 438 (690/341/285) ms 1000 Lines || || '''Query 5''' |||| 163316 (163316/-/-) ms 39690913 Lines |||| 1276218 (1276218/-/-) ms 39919489 Lines || || '''Query 6''' |||| 168517 (168517/-/-) ms 1 Lines |||| 1469 (1521/1456/1430) ms 1 Lines || || '''Query 7''' |||| too Long |||| 1487 (1565/1420/1477) ms 1 || === Evaluation === Bei den meisten Testfällen ist rdf3x dem virtuoso überlegen. Jedoch scheint Virtuoso die Aggregierung-Anfragen effizienter zu bearbeiten, wie man das am Beispiel der Queries 6,7 sieht. An den Anfragen 5,6 kann man vermuten, dass rdf3x erstmal die Anfrage 5 ausführt. Danach zählt er die Ergebniszeilen, um die Anfrage 6 zu berechnen. Virtuoso geht offensichtlich anders vor. Desweiteren kann man an der Anfrage 5 erkennen, dass die Ergebnislisten ungleich sind. Grund dafür sind wahrscheinlich die Lesefehler beim RDF-Satz-Laden Leider konnte die Anfrage 7 nur bei Virtuoso ausgeführt werden. Egebnis ist 243035237. Der ursprüngliche Datensatz enthält aber 243036034 Tripel. Es fehlen also 797 Tripel. Weitere Beobachtung ist, dass die Anzahl der Ergebnisse mal bei Virtuoso und mal bei rdf3x größer ist. Sieh Query 2 und 5. |
'' SELECT ?x ?y ?z WHERE{ ?x <is-a> <Musical_Recording> . ?x <Recorded_by> ?y . ?y <Award_Won> <Bollywood_Movie_Humanitarian_Award> . ?y <Celebrity_friend> ?z . ?z <Profession> <Prophet> } '' |
Triple Stores
We tested the performance of two triple stores: Virtuoso and RDF-3X. We compare them to our own triple score on a couple of benchmarks.
Software Installation
Installation von Virtuoso Open-Source Edition:
- Anweisungen in README-Datei folgen.
Installation von rdf3x:
- Kompilieren
Installation von SparqlEngineDraft:
Anweisungen befolgen.
Data Import
Um den Datensatz in die Triple Stores laden zu können, musste dieser Satz in einen für RDF-Speicherung gängigen Format umgewandelt werden. Ausgewählt wurde "*.nt"-Format. Der ursprünglicher Satz enthielt Values und Enteties. Values waren schon nt-conform, die Enteties mussten umgewandelt werden. Dafür wurden die Enteties in die eckigen Klammer gesetzt und die unzulässige Zeichen durch die entsprechende Prozent-Kodierungen oder auch von uns defenierten Ersatzzeichen ersetzt.
Ersetzungstabelle:
% |
< |
> |
\ |
^ |
` |
space |
||||||
%25 |
%3C |
%3E |
%5C |
%5E |
%60 |
_ |
Z.B.: Mikel Jackson --> <Mikel_Jackson>
Data Import Virtuoso:
Datenladen in den Virtuoso wurde mit Bulk loading process durchgefuhrt. Bei diesem Prozess muss der Name des RDF-Graphen als graph_iri eingegeben werden. Unter dieser Namen ist der RDF-Satz bei Virtuoso erreichbar und man benutzt graph_iri als prefix bei jeder Entety, wenn man eine Spqrql-Anfrage an den Store erstellt.
Z.B.: Mikel Jackson --> '<http://foo/Mikel_Jackson>'
Data Import Rdf3x:
Das Datenladen in den Rdf3x-Store erfolgt durch einen Skript <Installationsordner von Rdf3x>/bin/rdf3xload <DB-Name> <RDF-Satz-Pfad>. Kein zusatzlicher Prefix ist bei der Afragestellung erforderlich.
Z.B.: Mikel Jackson --> '<Mikel_Jackson>'
Data Import SparqlEngineDraft:
Anweisungen befolgen. Kein zusatzlicher Prefix ist bei der Afragestellung erforderlich.
Z.B.: Mikel Jackson --> '<Mikel_Jackson>'
Ladezeiten:
Die Größe des Input-RDF-Sets in der NT-Format beträgt 17 GB.
RDF-Store |
Ladezeit |
Indexgroße auf der Festplatte |
Indexgroße in der Arbeitspeicher |
|||
Virtuoso |
1170 min |
? |
? |
|||
Rdf3x |
76 min |
12 GB |
? |
|||
26 min |
14.2 GB |
3.5 GB |
Queries
Testvorgang
Als test-Framework wurde ein Python-Skript verwendet. Dabei wurde folgendes Abschnitt immer 3-Fach für jede Kombination Query<>RDF-Store ausgeführt.
start = int(round(time.time()*1000))
process = subprocess.Popen(command, stdout=subprocess.PIPE, shell=True)
out, err = process.communicate()
end = int(round(time.time()*1000))
wo
command = virtuosoISQL_path + "isql 127.0.0.1:1113 dba dba " + queryFile für Virtuoso
command = rdf3x_path + "rdf3xquery" + dataBase + " " + queryFile für rdf3x
Anfragen
Für jede Anfrage wurden zwei Datein erstellt die diese Anfrage enthalten: Eine für rdf3x und eine für Virtuoso.
Beispiel Anfrage für rdf3x:
SELECT * WHERE {
<The%20Format%20(Musical%20Recording)%20%231> ?b ?c
}
Beispiel Anfrage für Virtuoso:
SPARQL SELECT * WHERE {
<http://foo.org/The%20Format%20(Musical%20Recording)%20%231> ?b ?c
};
Tests
Zeilenformat: <time> (number of lines in result)
Query \ RDF Store |
rdf3x |
|||
Query 1 |
0.581ms(1) |
13.827ms(1) |
||
Query 2 |
17.632ms(5162) |
10.568ms(5162) |
||
Query 3 |
98.772ms(1579) |
57.344ms(1579) |
||
Query 4 |
22.731ms(9767) |
16.673ms(9767) |
||
Query 5 |
5.030ms(4) |
239.383ms(4) |
||
Query 6 |
65.057ms(0) |
72.879ms(0) |
||
Query 7 |
28.483ms(3697) |
30.418ms(3697) |
||
Query 8 |
9.559ms(164) |
21.509ms(164) |
||
Query 9 |
0.501ms(128) |
2.319ms(128) |
||
Query 10 |
476.191ms(1528) |
314.789ms(1528) |
Queries
Query 1
SELECT ?x WHERE { ?x <is-a> <Book> . ?x <Author> <Anthony_Newman_(Author)> }
Query 2
SELECT ?x WHERE { ?x <Genre> <Comedy> . ?x <is-a> <Award-Nominated_Work> . ?x <is-a> <Film> . }
Query 3
SELECT ?x WHERE { ?x <is-a> <Politician> . ?x <Film_performance> ?y . ?y <Genre> <Comedy> . }
Query 4
SELECT ?x WHERE { ?x <is-a> <Olympic_athlete> . ?x <is-a> <Deceased_Person> }
Query 5
SELECT ?x WHERE { ?x <Release> <Technodrome,_Volume_2_(Consumer_product)> . ?x <is-a> <Canonical_Version> . ?x <is-a> <Musical_Recording> . }
Query 6
SELECT ?x ?y WHERE { ?x <is-a> <Person> . ?x <Country_of_nationality> <Germany> . ?x <Author> ?y . ?y <is-a> <Award-Nominated_Work> }
Query 7
SELECT ?x WHERE { ?x <is-a> <Politician> . ?x <Parent> ?y . ?x <Parent> ?z . ?y <is-a> <Politician> . ?z <is-a> <Politician> . }
Query 8
SELECT ?x ?y WHERE{ ?x <is-a> <Monarch> . ?x <is-a> <Deceased_Person> .?x <Cause_of_death> <Assassination> . ?x <Place_of_birth> ?y }
Query 9
SELECT ?x WHERE{ ?x <is-a> <Lake> . ?x <Contained_by> <Russia> }
Query 10
SELECT ?x ?y ?z WHERE{ ?x <is-a> <Musical_Recording> . ?x <Recorded_by> ?y . ?y <Award_Won> <Bollywood_Movie_Humanitarian_Award> . ?y <Celebrity_friend> ?z . ?z <Profession> <Prophet> }