Graphdb Free Documentation Release 6.6
Total Page:16
File Type:pdf, Size:1020Kb
GraphDB Free Documentation Release 6.6 Ontotext Dec 14, 2017 CONTENTS 1 General 1 1.1 About GraphDB...........................................2 1.2 Architecture & Components.....................................2 1.2.1 Architecture.........................................2 1.2.1.1 Sesame.......................................3 1.2.1.2 The SAIL API...................................4 1.2.2 GraphDB components...................................4 1.2.2.1 Engine.......................................4 1.2.2.2 Connectors.....................................5 1.2.2.3 Workbench.....................................5 1.3 GraphDB Free............................................5 1.3.1 Comparison of GraphDB Free and GraphDB SE......................6 1.4 Connectors..............................................6 1.5 Workbench..............................................6 1.5.1 Requirements........................................7 1.5.2 How to use it........................................7 2 Quick Start Guide 9 2.1 Starting the database.........................................9 2.2 Creating locations and repositories................................. 10 2.3 Loading data............................................. 11 2.3.1 Supported file formats................................... 11 2.3.2 Loading data through the GraphDB Workbench...................... 11 2.3.2.1 To load a local file:................................ 11 2.3.2.2 To load a database server file:........................... 12 2.3.2.3 Other ways of loading data:............................ 13 2.3.3 Loading data through SPARQL or Sesame API...................... 13 2.3.4 Loading data through the GraphDB LoadRDF tool.................... 14 2.4 Querying data............................................ 14 2.4.1 Querying data through the GraphDB Workbench..................... 14 2.4.2 Querying data programmatically.............................. 15 2.4.2.1 Execute the example query with a HTTP GET request:.............. 15 2.4.2.2 Execute the example query with a POST operation:................ 15 2.4.3 Supported export/download formats............................ 15 2.5 Additional resources......................................... 15 3 Installation 17 3.1 Distribution Package......................................... 17 3.2 Requirements............................................. 18 3.2.1 Minimum requirements................................... 18 3.2.2 Production environment.................................. 18 3.2.2.1 Hardware..................................... 18 3.2.2.2 Software...................................... 18 3.2.2.3 Control & management.............................. 18 i 3.2.3 Licensing.......................................... 18 3.3 Installing GraphDB Free....................................... 18 3.3.1 Install GraphDB on a laptop/desktop computer...................... 18 3.3.2 Installing GraphDB on a server............................... 18 3.4 Upgrading GraphDB Free...................................... 19 3.4.1 Procedure.......................................... 19 3.4.2 Upgrade scenarios..................................... 19 3.4.2.1 The storage/ folder format is not different (for minor versions)........ 19 3.4.2.2 The storage/ folder format is different but GraphDB can auto-upgrade it (for minor changes in the format)........................... 20 3.4.2.3 The storage/ folder format is different but the changes cannot be auto- upgraded (for major versions)........................... 20 3.4.3 Upgrade from/to specific versions............................. 20 3.4.3.1 Upgrade from 6.2................................. 20 3.4.3.2 Upgrade from 6.1................................. 21 3.4.3.3 Upgrade from 5.4 to 6.2+............................. 21 3.4.3.4 Upgrade from 5.x................................. 21 4 Administration 23 4.1 Administration Tasks......................................... 23 4.2 Administration Tools......................................... 23 4.2.1 Through the Workbench.................................. 23 4.2.2 Through the JMX interface................................. 24 4.2.3 GraphDB configurator (spreadsheet)............................ 24 4.3 Creating a Repository........................................ 24 4.3.1 Creating locations and repositories............................. 24 4.4 Configuring a Repository...................................... 25 4.4.1 Steps............................................ 25 4.4.2 A repository configuration template - how it works.................... 26 4.4.3 Sample configuration.................................... 27 4.4.4 Configuration parameters.................................. 27 4.4.4.1 Debugging options................................. 30 4.4.5 Configuring memory.................................... 31 4.4.5.1 Configuring the JVM, the application and the GraphDB workspace memory.. 32 4.4.5.2 Configuring the memory for storing entities................... 32 4.4.5.3 Configuring the Cache memory.......................... 32 4.5 Sizing Guidelines........................................... 33 4.5.1 Entry-level deployment................................... 33 4.5.2 Mid-range deployment................................... 34 4.5.3 Enterprise deployment................................... 34 4.6 Disk Space Requirements...................................... 34 4.6.1 GraphDB disk space requirements for loading a dataset.................. 34 4.6.2 GraphDB disk space requirements per statement...................... 35 4.7 Configuring the Entity Pool..................................... 35 4.8 Starting & Shutting down GraphDB................................. 36 4.8.1 Starting GraphDB in the embedded Tomcat........................ 36 4.8.2 Shutting down GraphDB in the embedded Tomcat..................... 36 4.8.3 How to start/stop via non-embedded Tomcat (or other application server)........ 36 4.8.4 Shutting down a repository instance from the JMX interface............... 37 4.9 Managing Repositories........................................ 37 4.9.1 Changing repository parameters.............................. 37 4.9.2 Renaming a repository................................... 37 4.10 Access Rights and Security..................................... 38 4.10.1 Using the GraphDB Workbench.............................. 38 4.10.2 Using an HTTP authentication and the Sesame server’s deployment descriptor...... 40 4.10.2.1 Operations..................................... 40 4.10.2.2 Security constraints and roles........................... 40 4.10.2.3 User accounts................................... 42 ii 4.10.3 Programmatic authentication................................ 42 4.11 Backing up and Recovering a Repository.............................. 42 4.11.1 Backing up a repository................................... 42 4.11.2 Restoring a repository.................................... 44 4.12 Query and Transaction Monitoring................................. 45 4.12.1 Query monitoring and termination............................. 45 4.12.1.1 Preventing long running queries.......................... 46 4.12.2 Terminating a transaction.................................. 46 4.13 Diagnosing and Reporting Critical Errors.............................. 47 4.13.1 Logs............................................. 47 4.13.2 Report script........................................ 47 4.13.2.1 Requirements................................... 48 4.13.2.2 Example...................................... 48 5 Usage 51 5.1 Workbench User Guide....................................... 51 5.1.1 Installation, start-up and shut down............................. 51 5.1.2 Checking your setup.................................... 52 5.1.3 Using the Workbench.................................... 52 5.1.3.1 Managing locations................................ 52 5.1.3.2 Managing repositories............................... 53 5.1.4 Loading data into a repository............................... 56 5.1.4.1 Import settings................................... 56 5.1.4.2 Four ways to import data............................. 57 5.1.5 Executing queries...................................... 59 5.1.6 Exporting data....................................... 61 5.1.7 Viewing and editing resources............................... 63 5.1.8 Namespace management.................................. 65 5.1.9 Context view........................................ 66 5.1.10 Connector management................................... 67 5.1.11 Users and access management............................... 68 5.1.11.1 Free access..................................... 70 5.1.12 REST API.......................................... 70 5.1.13 Configuration properties.................................. 72 5.2 Using GraphDB with the Sesame API................................ 73 5.2.1 Sesame Application Programming Interface (API)..................... 73 5.2.1.1 Using the Sesame API to access a local GraphDB repository.......... 73 5.2.1.2 Using the Sesame API to access a remote GraphDB repository......... 74 5.2.2 Managing repositories with the Sesame Workbench.................... 75 5.2.3 SPARQL endpoint..................................... 75 5.2.4 Graph Store HTTP Protocol................................ 75 5.3 Using GraphDB with Jena...................................... 76 5.3.1 Installing GraphDB with Jena............................... 76 5.4 GraphDB Connectors........................................ 79 5.4.1 Lucene GraphDB Connector................................ 79 5.4.1.1 Overview and features............................... 79