Before you begin, you will need:
- A PostgreSQL JDBC Driver (I used the one available at jdbc.postgresql.org )
- Access to a PostgreSQL database: you must know the database's JDBC URL, and your user name and password. Contact your system administrator to set this up for you. Put the JDBC Driver file (called, in my case, pg73jdbc3.jar) in the Protege installation directory. (i.e. C:\Program Files\Protege_3.1)
- Open the file called "protege.lax", found in your Protege installation directory, in a text editor.
- Under the section titled "# LAX.CLASS.PATH", add the JDBC driver file (pg73jdbc3.jar) to the semicolon-delimited class path.
- Under the section titled "# SIMPLEJDBCDATABASEMANAGER.LONGVARCHARNAME" at the end of the file, change the line
SimpleJdbcDatabaseManager.longvarcharname=
to read:
SimpleJdbcDatabaseManager.longvarcharname= TEXTand save the "protege.lax" file.
Now open a Protege project, and select File -> Save In Format... and select 'JDBC'.
In the dialog box that appears, enter the following information:
Project -> The path of the project you would like to save to a Postgresql database
JDBC Driver Class Name -> org.postgresql.Driver
JDBC URL-> The JDBC URL of the Postgres Data base, in the format
jdbc:postgresql://hostname: port/database
Table->The name of the table (Protege saves all of its information in one flat table)
Username-> Your postgres username
Password->Your postgres password
..and click 'OK'!
Similar instructions can be used to import a project from a Postgresql database.

