Graphdb Free Documentation Release 8.11
Total Page:16
File Type:pdf, Size:1020Kb
GraphDB Free Documentation Release 8.11 Ontotext Sep 26, 2019 CONTENTS 1 General 1 1.1 About GraphDB...........................................2 1.2 Architecture & Components.....................................2 1.2.1 Architecture.........................................2 1.2.1.1 RDF4J.......................................3 1.2.1.2 The Sail API....................................4 1.2.2 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 2 Quick start guide 9 2.1 Run GraphDB as a Desktop Installation...............................9 2.1.1 On Windows........................................ 10 2.1.2 On MacOS......................................... 10 2.1.3 On Linux.......................................... 10 2.1.4 Configuring GraphDB................................... 10 2.1.5 Stopping GraphDB..................................... 11 2.2 Run GraphDB as a Standalone Server................................ 11 2.2.1 Running GraphDB..................................... 11 2.2.1.1 Options...................................... 11 2.2.2 Configuring GraphDB................................... 12 2.2.2.1 Paths and network settings............................ 12 2.2.2.2 Java virtual machine settings........................... 13 2.2.3 Stopping the database.................................... 13 2.3 Set up Your License......................................... 13 2.4 Create a Repository......................................... 13 2.5 Load Your Data............................................ 14 2.5.1 Load data through the GraphDB Workbench........................ 14 2.5.2 Load data through SPARQL or RDF4J API........................ 16 2.5.3 Load data through the GraphDB LoadRDF tool...................... 16 2.6 Explore Your Data and Class Relationships............................. 16 2.6.1 Explore instances...................................... 16 2.6.2 Create your own visual graph................................ 19 2.6.3 Class hierarchy....................................... 20 2.6.4 Domain-Range graph.................................... 22 2.6.5 Class relationships..................................... 24 2.7 Query Your Data........................................... 27 2.7.1 Query data through the Workbench............................. 27 2.7.2 Query data programmatically................................ 31 i 2.8 Additional Resources......................................... 31 3 Installation 33 3.1 Requirements............................................. 33 3.1.1 Minimum requirements................................... 33 3.1.2 Hardware sizing....................................... 33 3.1.3 Licensing.......................................... 34 3.2 Running GraphDB.......................................... 34 3.2.1 Run GraphDB as a Desktop Installation.......................... 34 3.2.1.1 On Windows.................................... 34 3.2.1.2 On MacOS..................................... 35 3.2.1.3 On Linux...................................... 35 3.2.1.4 Configuring GraphDB............................... 35 3.2.1.5 Stopping GraphDB................................ 36 3.2.2 Run GraphDB as a Standalone Server........................... 36 3.2.2.1 Running GraphDB................................. 36 3.2.2.2 Configuring GraphDB............................... 36 3.2.2.3 Stopping the database............................... 37 3.3 Configuring GraphDB........................................ 37 3.3.1 Directories......................................... 38 3.3.1.1 GraphDB Home.................................. 38 3.3.1.2 Checking the configured directories........................ 39 3.3.2 Configuration........................................ 39 3.3.2.1 Config properties................................. 39 3.3.2.2 Configuring logging................................ 40 3.3.3 Best practices........................................ 40 3.3.3.1 Step by step guide................................. 41 3.4 Migrating GraphDB Configurations................................. 41 3.4.1 Compatibility between the versions of GraphDB, Connectors and third party connectors 42 3.5 Distribution package......................................... 42 3.6 Using Maven Artifacts........................................ 43 3.6.1 Public Maven repository.................................. 43 3.6.2 Distribution......................................... 43 3.6.3 GraphDB JAR file for embedding the database or plugin development.......... 43 3.6.4 I want to proxy the repository in my nexus......................... 44 4 Administration 45 4.1 Administration tasks......................................... 45 4.2 Administration Tools......................................... 45 4.2.1 Workbench......................................... 46 4.2.2 JMX interface........................................ 46 4.2.2.1 Configuring the JMX endpoint.......................... 46 4.3 Creating Locations.......................................... 46 4.3.1 Active location....................................... 47 4.3.2 Inactive location...................................... 49 4.3.3 Connect to a remote location................................ 49 4.3.4 Configure a data location.................................. 50 4.4 Creating a Repository........................................ 51 4.4.1 Create a repository..................................... 51 4.4.1.1 Using the Workbench............................... 51 4.4.1.2 Using the RDF4J console............................. 52 4.4.2 Manage repositories..................................... 52 4.4.2.1 Select a repository................................. 52 4.4.2.2 Make it a default repository............................ 52 4.4.2.3 Edit a repository.................................. 53 4.5 Configuring a Repository...................................... 53 4.5.1 Plan a repository configuration............................... 53 4.5.2 Configure a repository through the GraphDB Workbench................. 54 ii 4.5.3 Edit a repository...................................... 54 4.5.4 Configure a repository programmatically.......................... 55 4.5.5 Configuration parameters.................................. 56 4.5.6 Configure GraphDB memory................................ 59 4.5.6.1 Configure Java heap memory........................... 59 4.5.6.2 Single global page cache............................. 59 4.5.6.3 Configure Entity pool memory.......................... 59 4.5.6.4 Sample memory configuration.......................... 60 4.5.6.5 Upper bounds for the memory consumed by the GraphDB process....... 60 4.5.7 Reconfigure a repository.................................. 60 4.5.7.1 Using the Workbench............................... 60 4.5.7.2 Global overrides.................................. 60 4.5.8 Rename a repository.................................... 61 4.5.8.1 Using the workbench............................... 61 4.6 Secure GraphDB........................................... 61 4.6.1 Enable security....................................... 61 4.6.2 Login and default credentials................................ 62 4.6.3 Free access......................................... 62 4.6.4 Users and Roles....................................... 63 4.6.4.1 Create new user.................................. 63 4.6.4.2 Set password.................................... 64 4.7 Request Tracking........................................... 64 4.8 Application Settings......................................... 64 4.9 Backing up and Restoring a Repository............................... 65 4.9.1 Back up a repository.................................... 65 4.9.1.1 Export repository to an RDF file......................... 66 4.9.1.2 Back up a repository using JMX interface.................... 67 4.9.1.3 Back up GraphDB by copying the binary image................. 69 4.9.2 Restore a repository..................................... 69 4.10 Query Monitoring and Termination................................. 70 4.10.1 Query monitoring and termination using the workbench.................. 70 4.10.2 Query monitoring and termination using the JMX interface................ 71 4.10.2.1 Query monitoring................................. 71 4.10.2.2 Terminating a query................................ 72 4.10.3 Terminating a transaction.................................. 72 4.10.4 Automatically prevent long running queries........................ 73 4.11 Performance Optimizations..................................... 73 4.11.1 Data loading & query optimizations............................ 73 4.11.1.1 Dataset loading.................................. 74 4.11.1.2 GraphDB’s optional indices............................ 75 4.11.1.3 Cache/index monitoring and optimizations.................... 75 4.11.1.4 Query optimizations................................ 76 4.11.2 Explain Plan......................................... 77 4.11.2.1 What is GraphDB’s Explain Plan......................... 77 4.11.2.2 Activating the explain plan............................ 78 4.11.2.3 Simple explain plan................................ 78 4.11.2.4 Multiple triple patterns.............................. 79 4.11.2.5 Wine queries...................................