Posts Tagged: rdf


9
May 11

Installing 4Store on MacOSX

Having got on fairly well with installing swiftOWLIM, I thought it would be a good idea to have a go with 4Store.

  1. Download the disk image.
  2. Open the disk image and copy the app to your Applications.
  3. Run the app.
  4. A terminal window will open which has the 4Store command-line tools in it’s path.
  5. Create a database (instructions): I went with the basic command.
    4s-backend-setup mystorename
  6. Load some data (instructions): here I wanted to load multiples so used the command:
    4s-import mystorename `ls /path/to/ntriples/*.nt`

    Some few minutes later (really not very long at all), my 18 million triples were loaded at a rate of something like 55,000 triples per second!

  7. Set up a SPARQL endpoint (instructions). 4Store has an internal soft limit on SPARQL queries to protect you from expensive ?s ?p ?o queries and other expensive query types. This defaults to 1000, but I wanted to alter that so I could run some queries which I knew were going to be inefficient due to the structure of the data I am working with. As this is my dev machine, I decided to just turn the soft limit off for all SPARQL endpoints that I create. Therefore I created a config file in /etc/4store.conf
    sudo vi /etc/4store.conf
    [default]
        soft-limit = 0 #disable soft limit.

    Then started the SPARQL http server endpoint on my chosen port.

    4s-httpd -p 8000 mystorename
  8. All done. and running expensive queries that return pretty fast.

This has to be the easiest setup of a triple store yet.