Graphdb-Free.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
GraphDB Free Documentation Release 9.1 Ontotext Jan 21, 2020 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 1.6 Benchmarks.............................................7 1.6.1 LDBC Semantic Publishing Benchmark 2.0........................7 1.6.1.1 Data loading....................................8 1.6.1.2 Production load..................................8 1.6.2 Berlin SPARQL Benchmark (BSBM)...........................9 2 Quick start guide 11 2.1 Run GraphDB as a Desktop Installation............................... 11 2.1.1 On Windows........................................ 12 2.1.2 On MacOS......................................... 12 2.1.3 On Linux.......................................... 12 2.1.4 Configuring GraphDB................................... 12 2.1.5 Stopping GraphDB..................................... 13 2.2 Run GraphDB as a Standalone Server................................ 13 2.2.1 Running GraphDB..................................... 13 2.2.1.1 Options...................................... 13 2.2.2 Configuring GraphDB................................... 14 2.2.2.1 Paths and network settings............................ 14 2.2.2.2 Java virtual machine settings........................... 15 2.2.3 Stopping the database.................................... 15 2.3 Set up Your License......................................... 15 2.4 Create a Repository......................................... 15 2.5 Load Your Data............................................ 16 2.5.1 Load data through the GraphDB Workbench........................ 16 2.5.2 Load data through SPARQL or RDF4J API........................ 18 2.5.3 Load data through the GraphDB LoadRDF tool...................... 18 2.6 Explore Your Data and Class Relationships............................. 18 2.6.1 Explore instances...................................... 18 2.6.2 Create your own visual graph................................ 22 2.6.3 Class hierarchy....................................... 23 i 2.6.4 Domain-Range graph.................................... 25 2.6.5 Class relationships..................................... 27 2.7 Query Your Data........................................... 30 2.7.1 Query data through the Workbench............................. 30 2.7.2 Query data programmatically................................ 34 2.8 Additional Resources......................................... 34 3 Installation 35 3.1 Requirements............................................. 35 3.1.1 Minimum requirements................................... 35 3.1.2 Hardware sizing....................................... 35 3.1.3 Licensing.......................................... 36 3.2 Running GraphDB.......................................... 36 3.2.1 Run GraphDB as a Desktop Installation.......................... 36 3.2.1.1 On Windows.................................... 36 3.2.1.2 On MacOS..................................... 37 3.2.1.3 On Linux...................................... 37 3.2.1.4 Configuring GraphDB............................... 37 3.2.1.5 Stopping GraphDB................................ 38 3.2.2 Run GraphDB as a Standalone Server........................... 38 3.2.2.1 Running GraphDB................................. 38 3.2.2.2 Configuring GraphDB............................... 38 3.2.2.3 Stopping the database............................... 39 3.3 Configuring GraphDB........................................ 40 3.3.1 Directories......................................... 40 3.3.1.1 GraphDB Home.................................. 40 3.3.1.2 Checking the configured directories........................ 41 3.3.2 Configuration........................................ 41 3.3.2.1 Config properties................................. 41 3.3.2.2 Configuring logging................................ 43 3.3.3 Best practices........................................ 43 3.3.3.1 Step by step guide................................. 43 3.4 Migrating GraphDB Configurations................................. 43 3.4.1 Compatibility between the versions of GraphDB, Connectors, and third party connectors 44 3.4.2 Migrating a repository................................... 44 3.4.3 Migrating a cluster..................................... 45 3.4.3.1 Single master with three or more workers..................... 45 3.4.3.2 Two masters sharing workers, one of the masters is read-only.......... 45 3.4.3.3 Multiple masters with dedicated workers..................... 46 3.4.4 Migrating connectors and plugins............................. 46 3.5 Distribution package......................................... 47 3.6 Using Maven Artifacts........................................ 48 3.6.1 Public Maven repository.................................. 48 3.6.2 Distribution......................................... 48 3.6.3 GraphDB JAR file for embedding the database or plugin development.......... 48 4 Administration 51 4.1 Administration tasks......................................... 51 4.2 Administration Tools......................................... 51 4.2.1 Workbench......................................... 52 4.2.2 JMX interface........................................ 52 4.2.2.1 Configuring the JMX endpoint.......................... 52 4.3 Creating Locations.......................................... 52 4.3.1 Active location....................................... 53 4.3.2 Inactive location...................................... 55 4.3.3 Connect to a remote location................................ 55 4.3.4 Configure a data location.................................. 56 4.4 Creating a Repository........................................ 57 ii 4.4.1 Create a repository..................................... 57 4.4.1.1 Using the Workbench............................... 57 4.4.1.2 Using the RDF4J console............................. 58 4.4.2 Manage repositories..................................... 58 4.4.2.1 Select a repository................................. 58 4.4.2.2 Make it a default repository............................ 58 4.4.2.3 Edit a repository.................................. 59 4.5 Configuring a Repository...................................... 59 4.5.1 Plan a repository configuration............................... 59 4.5.2 Configure a repository through the GraphDB Workbench................. 60 4.5.3 Edit a repository...................................... 61 4.5.4 Configure a repository programmatically.......................... 61 4.5.5 Configuration parameters.................................. 62 4.5.6 Configure GraphDB memory................................ 65 4.5.6.1 Configure Java heap memory........................... 65 4.5.6.2 Single global page cache............................. 65 4.5.6.3 Configure Entity pool memory.......................... 66 4.5.6.4 Sample memory configuration.......................... 66 4.5.6.5 Upper bounds for the memory consumed by the GraphDB process....... 66 4.5.7 Reconfigure a repository.................................. 66 4.5.7.1 Using the Workbench............................... 67 4.5.7.2 Global overrides.................................. 67 4.5.8 Rename a repository.................................... 67 4.5.8.1 Using the workbench............................... 67 4.6 Secure GraphDB........................................... 67 4.6.1 Enable security....................................... 68 4.6.2 Login and default credentials................................ 68 4.6.3 Free access......................................... 68 4.6.4 Users and Roles....................................... 69 4.6.4.1 Create new user.................................. 69 4.6.4.2 Set password.................................... 71 4.7 Request Tracking........................................... 71 4.8 Application Settings......................................... 71 4.9 Backing up and Restoring a Repository............................... 72 4.9.1 Back up a repository.................................... 73 4.9.1.1 Export repository to an RDF file......................... 73 4.9.1.2 Back up a repository using JMX interface.................... 74 4.9.1.3 Back up GraphDB by copying the binary image................. 75 4.9.2 Restore a repository..................................... 76 4.10 Query Monitoring and Termination................................. 76 4.10.1 Query monitoring and termination using the workbench.................. 77 4.10.2 Query monitoring and termination using the JMX interface................ 78 4.10.2.1 Query monitoring................................. 78 4.10.2.2 Terminating a query................................ 79 4.10.3 Terminating a transaction.................................. 79 4.10.4 Automatically prevent long running queries........................ 79 4.11 Performance Optimizations..................................... 79 4.11.1 Data loading & query optimizations...........................