Accessing the database. The Swiss Feed Database is run under PostgreSQL open source database management system. The parameters to access the database are the following: |
|
host name: |
talis.ifi.uzh.ch |
port: |
5432 |
database name: |
tfdb |
|
|
The login name and password are assigned by the request to Andrej Taliun or Francesco Cafagna. The database can be accessed from multiple environments. The easiest approach is to use pgAdmin that provides a highly developed graphical user interface and is run on the most of the operating systems. One can also connect to the database from a command line with 'psql -d tfdb -h talis.ifi.uzh.ch -p 5432 -U your_login_name -W', using PhP as described in the example or with Java using the JDBC driver. All connection to the database are via ssl protocol. The following example illustrates how it can be achieved in Java: |
... |
|
Class.forName("org.postgresql.Driver"); |
|
|
Properties prop = new Properties(); |
|
prop.put("user",your_login); |
|
prop.put("password", your_password); |
|
prop.put("ssl", "true"); |
|
prop.put("sslfactory", "org.postgresql.ssl.NonValidatingFactory"); |
|
Connection conn = DriverManager.getConnection("jdbc:postgresql://" + "talis.ifi.uzh.ch:5432/" +"tfdb", prop); |
... |