Teleios Fp7-257662
Total Page:16
File Type:pdf, Size:1020Kb
TELEIOS FP7-257662 Deliverable D4.2 An implementation of a temporal and spatial extension of RDF and SPARQL on top of MonetDB - Phase II Konstantina Bereta, Kallirroi Dogani, George Garbis, Stella Giannakopoulou, Manolis Koubarakis, Kostis Kyzirakos, Charalampos Nikolaou, Michael Sioutis, Panayiotis Smeros, Bakogiannis Dimitrios, Foufoulas Ioannis, Smaragdakis Ioannis, and Consortium Members March 22, 2013 Status: Final Scheduled Delivery Date: 28 February, 2013 TELEIOS FP7-257662 Executive Summary In this deliverable we present the second phase of the implementation of our temporal and spatial extensions of RDF and SPARQL, called stRDF, RDFi and stSPARQL, in the system Strabon. This follows deliverable D4.1., in which we documented the first implementation phase of the sys- tem Strabon. First, we present the valid time dimension of the data model stRDF and the query language stSPARQL and their implementation in Strabon. The valid time functionality, together with the geospatial features of Strabon, make Strabon the first spatio-temporal RDF store with many fea- tures and excellent performance as shown by our experimental evaluation. Second, we investigate the problem of extending existing relational database systems with reason- ing capabilities for incomplete spatial information. In this context, we implement a well-known algorithm for checking the consistency of RCC-8 constraint networks in PostgreSQL and MonetDB and contrast it with the state of the art qualitative spatial reasoners. We have chosen these two systems since these are currently the backends supported by Strabon. Our ultimate goal here is to prepare the technological ground for developing scalable query processing algorithms for the RDFi framework on top of our geospatial RDF store Strabon. The same tehcnologies can be used to enable query processing for the topology vocabulary extension of GeoSPARQL in Strabon. D4.2 An implementation of a temporal and spatial extension of RDF and SPARQL on top of i MonetDB - Phase II TELEIOS FP7-257662 Document Information Contract Number FP7-257662 Acronym TELEIOS Full title TELEIOS: Virtual Observatory Infrastructure for Earth Observation Data Project URL http://www.earthobservatory.eu/ EU Project Officer Francesco Barbato Deliverable Number D4.2 Name An implementation of a temporal and spatial extension of RDF and SPARQL on top of Mon- etDB - Phase II Task Number T4.2 Name Query processing and optimization for a tem- poral and spatial extension of RDF and SPARQL on top of MonetDB - phase II: in- definite geospatial information Work package Number WP4 Date of delivery Contract M30 (Feb. 2013) Actual 23 February 2013 Status Draft Final Nature Prototype2 Report2 Distribution Type Public 2Restricted 2 Responsible Partner NKUA2 2 QA Partner CWI Contact Person Manolis Koubarakis Email [email protected] Phone +30 210 727 Fax +30 210 727 5213 5214 D4.2 An implementation of a temporal and spatial extension of RDF and SPARQL on top of ii MonetDB - Phase II TELEIOS FP7-257662 Project Information This document is part of a research project funded by the IST Programme of the Commission of the European Communities as project number FP7-257662. The Beneficiaries in this project are: Partner Acronym Contact National and Kapodistrian University NKUA Prof. Manolis Koubarakis of Athens National and Kapodistrian University of Department of Informatics and Athens Telecommunications Department of Informatics and Telecommu- nications Panepistimiopolis, Ilissia, GR-15784 Athens, Greece Email: ([email protected]) Tel: +30 210 7275213, Fax: +30 210 7275214 Fraunhofer Institute for Computer Fraunhofer Dr. Eva Klien Graphic Research Fraunhofer Institute for Computer Graphic Research Fraunhofer Strasse 5, D-64283 Darmstadt, Germany Email: ([email protected]) Tel: +49 6151 155 412, Fax: +49 6151 155 444 German Aerospace Center DLR Prof. Mihai Datcu The Remote Sensing Technology In- German Aerospace Center stitute The Remote Sensing Technology Institute Photogrammetry and Image Analysis Oberpfaffenhofen, D-82234 Department Wessling, Germany Image Analysis Team Email: ([email protected]) Tel: +49 8153 28 1388, Fax: +49 8153 28 1444 Stichting Centrum voor Wiskunde en CWI Prof. Martin Kersten Informatica Stichting Centrum voor Wiskunde en Infor- Database Architecture Group matica P.O. Box 94097, NL-1090 GB Amsterdam, Netherlands Email: ([email protected]) Tel: +31 20 5924066, Fax: +31 20 5924199 National Observatory of Athens NOA Dr. Charis Kontoes Institute for Space Applications and National Observatory of Athens Remote Sensing Institute for Space Applications and Remote Sensing Vas. Pavlou and I. Metaxa, GR 152 36 Athens, Greece Email: ([email protected]) Tel: +30 210 8109186, Fax: +30 210 6138343 Advanced Computer Systems A.C.S ACS Mr. Ugo Di Giammatteo S.p.A Advanced Computer Systems A.C.S S.p.A Via Della Bufalotta 378, RM-00139 Rome, Italy Email: ([email protected]) Tel: +39 06 87090944, Fax: +39 06 87201502 D4.2 An implementation of a temporal and spatial extension of RDF and SPARQL on top of iii MonetDB - Phase II TELEIOS FP7-257662 Contents 1 Introduction 1 2 Representing and querying the valid time of triples in Strabon3 2.1 Valid time representation in the data model stRDF..................4 2.2 Querying valid times using the query language stSPARQL..............5 2.3 Implementation of valid time support in Strabon...................8 2.4 Evaluation.........................................9 2.5 Related Work....................................... 13 3 Database Techniques for Incomplete Spatial Information 15 3.1 Querying Incomplete Spatial Information....................... 15 3.2 Preliminaries....................................... 19 3.2.1 Constraint Networks and Relation Algebra.................. 19 3.2.2 Composition and Weak Composition...................... 20 3.2.3 Path Consistency and Algebraic Closure.................... 21 3.2.4 Varieties of k-consistency............................ 21 3.3 Qualitative Spatial Reasoning.............................. 21 3.3.1 The Region Connection Calculus........................ 22 3.3.2 Path Consistency Algorithm........................... 23 3.4 State of the Art Reasoners for the RCC-8 Calculus.................. 23 3.4.1 Renz’s RCC-8 Solver............................... 24 3.4.2 PelletSpatial................................... 24 3.4.3 Generic Qualitative Reasoner.......................... 25 3.4.4 PyRCC8...................................... 25 3.5 Enabling RCC-8 Reasoning in a Database....................... 26 3.5.1 Transferring Renz’s solver to MonetDB.................... 26 3.5.2 The Path Consistency Algorithm as a SQL program............. 27 3.5.3 Implementation of an RCC-8 module in MonetDB.............. 31 3.6 Experimental Evaluation................................. 31 3.6.1 Hardware setup.................................. 34 3.6.2 Datasets...................................... 34 3.6.3 Evaluation.................................... 37 4 Conclusions 40 A Instructions for installing and using the temporal component of Strabon 41 A.1 Instructions for installing and using the temporal component of Strabon...... 41 B Instructions for running the implementations of Chapter 3 43 B.1 Instructions to run Renz’s code in MonetDB...................... 43 B.2 Instructions to run the SQL implementation in MonetDB.............. 45 B.3 Instructions to run the SQL implementation in PostgreSQL............. 47 B.4 Instructions to run the implementation of the RCC-8 module in MonetDB..... 48 B.5 Extensions to MonetDB................................. 49 C Efficient Algorithms for Checking the Consistency of Chordal RCC-8 Networks 50 D Incomplete Information in RDF 83 D4.2 An implementation of a temporal and spatial extension of RDF and SPARQL on top of iv MonetDB - Phase II TELEIOS FP7-257662 List of Figures 2.1 The datatypes of stRDF.................................5 2.2 Architecture of the system Strabon enhanced with valid time support.......8 2.3 Query response time with respect dataset size..................... 11 3.1 The relations of RCC-8................................. 23 3.2 Path consistency algorithm as SQL program in MonetDB.............. 32 3.3 Path consistency algorithm as SQL program in PostgreSQL............. 33 3.4 Performance of consistency checking for the admingeo RDF dataset......... 37 3.5 Degree distributions of various datasets........................ 38 3.6 Number of edges grouped by type for various datasets................ 39 B.1 File wiki.csp ....................................... 44 B.2 Creation of schema RCC8 and table R .......................... 44 B.3 Script 01_create_R.sql ................................. 45 B.4 Script 02_create_rcc8-env.sql ............................ 46 B.5 Script verb03_composition-table_copy-into.sql ................. 46 B.6 Script wiki.sql ..................................... 47 B.7 Script run_rcc8pc.mal ................................. 49 D4.2 An implementation of a temporal and spatial extension of RDF and SPARQL on top of v MonetDB - Phase II TELEIOS FP7-257662 List of Tables 2.1 Composition of the GovTrack datasets in valid time representations........ 11 2.2 System performance in experiment 2.......................... 12 2.3 System performance in experiment 3.......................... 12 3.1 Definition of the various relations of RCC. Relations in bold are included in RCC-8 22 3.2 Composition of RCC-8 relations............................. 24 3.3 Encoding of RCC-8 relations.............................. 28 3.4 Integer encoding of objects