/mysqldump-vo

VOTables dump and output support for MySQL through customized mysqldump

Primary LanguageCGNU General Public License v2.0GPL-2.0

A fork of the mysqldump tool distributed with MySQL 5.5.28. Our version supports 
dumping tables in the VOTable 1.3 format (BINARY and ASCII). 

Further our version support remote dumping of TAB/CSV/... separated files, which
in the original version of mysqldump only worked locally.

VOTable 1.3 output has been validated with the latest STILTS votlint tool. Output 
should thus conform to the standard (but we cannot guarantee this yet at this 
BETA stage).

Some features (such as dumping TIME fields) are not yet implemented since it is 
not yet clear from the VOTable specs how this is achieved. 

In order to use this tool, you need the MySQL sources of the MySQL version you 
are using.


UCDs - Unit support
-------------------

This tool will write UCD and unit information into the VOTable output, if they
are defined in the columns comment in a special form. Since this was designed
to work with Daiquiri-Web, UCD and unit will be safed in a web friednly way
using JSONs.

To add UCD and unit information to your columns comment section, add the following
with the given format:

CREATE TABLE foo (bar1 INT COMMENT 'DQIMETA={"unit":"fooUnit","ucd":"fooUCD; barUCD"}', 
				  bar2 DOUBLE COMMENT 'DQIMETA={"unit":"fooUnit","ucd":"fooUCD; barUCD"}',
				  ...);

You can also add additional information to the JSON is you need it somewhere else.


To install
----------

Dependencies: MySQL sources, cmake

1) Download the mysql source corresponding to your installed
   version. Building mysql from scratch is recommended.

   Note: ONLY MYSQL VERSION 5.5 AND ABOVE ARE CURRENTLY 
   	 SUPPORTED (I.E. TESTED - COULD WORK WITH OTHERS...)

2) copy default.CMakeList.txt to CMakeList.txt and edit it accordingly to point to the directory where mysql is installed and where the mysql sources are located.

3) set CMAKE_INSTALL_PREFIX to the desired location. This will
   install mysqldump_vo in the specified directory.

4) mkdir build
   cd build

5) cmake ..

6) make

7) sudo make install

DONE: you can now use mysqldump_vo

Usage
-----

Use mysqldump_vo as you would use mysqldump. We have added the following two arguments:

--vo        VOTable XML TABLEDATA serialisation (ASCII - human readable)
--vo-bin    VOTable BINARY serialisation - NULL values are assumed to be MAX_INT
--vo-bin2   VOTable BINARY2 serialisation - the ONLY way to use binary VOTables 
			(better NULL treatment)

--tab-remote Tab-separated files from remotely located mysql servers - all options of original
             --tab implementation are supported (i.e. --fields-terminated-by, --lines-terminated-by,
             --fields-enclosed-by, --fields-optionally-enclosed-by, --fields-escaped-by)

Certain restrictions still apply. There are various datatypes that cannot be represented 
in VOTable yet (Error will be thrown, mainly date and time related types...). Just try 
to see if it works or not...

BINARY/BINARY2 representations will be encoded using base64. No other encoding is 
currently supported or planned.