W3C home > Mailing lists > Public > www-rdf-dspace@w3.org > December 2003

script for loading data into Postgres

From: Butler, Mark <Mark_Butler@hplb.hpl.hp.com>
Date: Fri, 12 Dec 2003 16:00:42 -0000
Message-ID: <E864E95CB35C1C46B72FEA0626A2E808206359@0-mail-br1.hpl.hp.com>
To: "'SIMILE public list'" <www-rdf-dspace@w3.org>
Hi team

I've written some Java which batch loads all the files ending in ".rdf" in
the current directory into a postgres database - see enclosed file.
Apologies in advance if I am telling you stuff which is obvious, it's just
it took me a little while to work it all out. 

Here's an example of what you need to do in Postgres - taken from

1. Start the IPC daemon (I'm running on Cygwin so this may be Cygwin

ipc-daemon &

2. Initialise postgres:

initdb -D /usr/local/pgsql/data

3. Start postgres:

postmaster -i -D /usr/local/pgsql/data > logfile 2>&1 &

4. Create a postgres database called "similedemo"

createdb similedemo

5. start up the postgres interactive interface and create a user called
simile e.g.

psql similedemo
create user simile;

6. Then to load the files, change to the directory containing the RDF and

java LoadDB similedemo ocw simile


java LoadDB similedemo artstor simile 

7. Andy explains how to publish this in Joseki here

As Andy said, the plan is to have three models - one containing Artstor, one
containing OCW, and one containing both. 

Dr Mark H. Butler
Research Scientist                HP Labs Bristol
Internet: http://www-uk.hpl.hp.com/people/marbut/

Received on Friday, 12 December 2003 11:03:22 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:13:09 UTC