Updating MonetDB Databases

Proximity 4.3 is fully compatible with MonetDB 4.6.2, the version of MonetDB distributed with Proximity 4.0 through 4.2. Users updating from Proximity 4.0 or later versions can continue to use their existing MonetDB installation and databases and safely ignore this section. However, if you choose to update your MonetDB installation to one of the “Mars” versions, you must also update your databases to use the new database format. Users updating from Proximity 3.1 or earlier should contact technical support at for assistance.

Updating databases from MonetDB 4.6.2 to Monet Mars (4.18.2 or 4.20) requires exporting the current database to the Proximity plain text or XML data format and then importing the data into the new version of MonetDB. For most import or export operations, we recommend using the more robust Proximity XML format in order to take advantage of its error checking capabilities. In this case, because you are importing unchanged data exported from Proximity, the use of the plain text format is recommended for performance reasons. See Chapter 3, Importing and Exporting Proximity Data, for additional information on exporting and importing data using Proximity’s plain text and XML data formats.

Databases converted to MonetDB Mars may not be usable in older versions of MonetDB. We recommend that you backup any database that you might want to use in an older version of MonetDB before converting it to MonetDB Mars.

Updating databases using plain text

  1. If you have not already done so, install the new versions of Proximity and MonetDB. Do not delete MonetDB 4.6.2.

  2. Serve the database using MonetDB 4.6.2.

    >/usr/local/Monet-46/bin/Mserver  --dbname db-name \
    $PROX_HOME/resources/init-mserver.mil --set port=45678

    where db-name is the database name and $PROX_HOME is the location of your local Proximity installation. Using a port number > 4000 tells Proximity to use the MonetDB 4.6.2 protocol.

    Windows users should substitute the appropriate path to their MonetDB 4.6.2 installation’s Mserver command.

  3. Export the data to plain text files. You can only export data to the same machine as that serving the database.

    >$PROX_HOME/bin/export-text.sh localhost:45678 data-dir

    where data-dir is the absolute path to the directory that will hold the exported plain text data files.

    Windows users should use export-text.bat instead of export-text.sh.

  4. Quit the MonetDB server.

    MonetDB> quit();

  5. Serve the new (empty) database. Make sure that you use the correct path to your new Mserver command either by changing PATH or by explicitly including the path on the command line.

    > /usr/local/Monet-mars/bin/Mserver --dbname db-name \
    $PROX_HOME/resources/init-mserver.mil.

    where db-name is the database name. Note that Proximity 4.3 changes the default port number to 30000. Proximity 4.3 requires a port number   40000 for MonetDB Mars.

    Windows users should substitute the appropriate path to their MonetDB 4.18.2 installation’s Mserver command.

  6. Initialize the new database.

    > $PROX_HOME/bin/db-util.sh localhost:45678 init-db

    Windows users should use db-util.bat instead of db-util.sh.

  7. Import the plain text data. You can only import data residing on the same machine as that serving the database.

    > $PROX_HOME/bin/import-text.sh localhost:30000 data-dir

    where data-dir is the absolute path to the directory containing the plain text data files created in step 3.

    Windows users should use import-text.bat instead of import-text.sh.