Tag Archives: ToroDB

PostgreSQL’s Best-Kept Secret, and how to Use it with jOOQ


via PostgreSQL’s Best-Kept Secret, and how to Use it with jOOQ | Java Code Geeks.

PostgreSQL has a lot of secret data types. In recent times, PostgreSQL’s JSON and JSONB support was hyped as being the NoSQL on SQL secret (e.g. as advertised by ToroDB) that allows you to get the best out of both worlds. But there are many other useful data types, among which the range type.

ToroDB database


kvdocument [kvdocument] Imported version 0.10 7 days ago
torod [torod] Imported version 0.10 7 days ago
torodb [torodb] Imported version 0.10 7 days ago
.gitignore ToroDB global files (README, license, etc) 7 days ago
CONTRIBUTING.md ToroDB global files (README, license, etc) 7 days ago
LICENSE-GNU_AGPLv3.txt ToroDB global files (README, license, etc) 7 days ago
README.md ToroDB global files (README, license, etc) 7 days ago
pom.xml [torodb] Imported version 0.10 7 days ago

ToroDB is an open source, document-oriented, JSON database that runs on top of PostgreSQL. JSON documents are stored relationally, not as a blob/jsonb. This leads to significant storage and I/O savings. It speaks natively the MongoDB protocol, meaning that it can be used with any mongo-compatible client.

ToroDB follows a RERO (Release Early, Release Often) policy. Current version is considered a “developer preview” and hence is not suitable for production use. However, any feedback, contributions, help and/or patches are very welcome.

Requisites

ToroDB is written in Java and requires:

  • A suitable JVM, version 6 or higher. It has been tested with Oracle JVM v8.
  • A PostgreSQL database, version 9.4. PostgreSQL 9.4 is currently in beta3.

Installation

You may compile ToroDB yourself. All the project is written in Java and managed with Maven, so you need a javac and maven. Just execute “mvn package” on the root directory and find the executable jar file intorodb/target/torodb-0.10-jar-with-dependencies.jar.

Alternatively, you may download a compiled version from ToroDB’s maven repository.

Running ToroDB

Execute with java -jar <path>/torodb-0.10-jar-with-dependencies.jar <arguments>. If you run with --help, you will see the required and optional arguments to run ToroDB:

--ask-for-password
   Force input of PostgreSQL's database user password.
   Default: false
-c, --connections
   Number of connections to establish to the PostgreSQL database
   Default: 10
-d, --dbname
   PostgreSQL's database name to connect to (must exist)
   Default: torod
-p, --dbport
   PostgreSQL's server port
   Default: 5432
--debug
   Change log level to DEBUG
   Default: false
-h, --host
   PostgreSQL's server host (hostname or IP address)
   Default: localhost
-P, --mongoport
   Port to listen on for Mongo wire protocol connections
   Default: 27017
--help, --usage
   Print this usage guide
   Default: false
-u, --username
   PostgreSQL's database user name. Must be a superuser
   Default: postgres
--verbose
   Change log level to INFO
   Default: false

The database must exist, and the username must have superuser privileges. This will be changed in the future.

Alternatively to the command line options, you may create a ~/.toropass file, which follows the syntax ofPostgreSQL’s pgpass files.