The mainly difference, which help to decide the selecting decision for the software design is the embedded mode. H2 supports this kind of the mode while PostgreSQL doesn't support it. Further H2 is platform independent and mostly used for the small application and PostgreSQL only supports some kind of the OS.
1. The package must be loaded into the workspace
install.packages("RPostgreSQL")
library(RPostgreSQL)
2. A driver must be loaded
drv <- dbDriver("PostgreSQL")
3. Create a connection to a database
con <- dbConnect(drv, host="localhost",port="5432", user="postgres", dbname="test", password="blub")
4. Submits a statement (this can be also a insert, drop or update SQL statment)
rs <- dbSendQuery(con, "select * from Test")
5. Fetch all elements from the result set
fetch(rs,n=-1)
## Closes the connection
dbDisconnect(con)
## Frees all the resources on the driver
dbUnloadDriver(drv)
install.packages("RODBC");
channel <- odbcConnect("odbc_dns_entry_name");
odbcQuery(channel,"insert ...");
sqlFetch(channel, "table_name");
Further information of the RODBC functionalities could be found here
openssl req -new -text -out server.req
openssl rsa -in privkey.pem -out server.key
rm privkey.pem
openssl req -x509 -in server.req -text -key server.key -out server.crt
chmod og-rwx server.key
The solution we found where file system level backups, they are faster by a factor of 5 to 10.
These have two restrictions:
This method can be extended by creating incremental backups (rsync is your friend) or creating snapshots, if the operating system permits it (ZFS has been reported to work well).