Export the Existing Data
RDM 12 comes with a data export utility named rdmexport
. This utility allows an existing database (both schema and data) to be exported into a single SQL file that can be used directly to create and populate a new database for RaimaDB 16.0.
Export the Data From RDM 12
To export an RDM 12 database using rdmexport
, take the following steps:
- Change directory to the database document root.
- Execute
rdmexport
as follows.
$ rdmexport dbname
This creates an SQL file named dbname.sql
. The SQL file consists of the schema definition of the database, as well as one or more SQL INSERT statements.
Export the Schema Definition (optional)
If you wish to access the newly-created RaimaDB 16.0 database through our Core API, you need to create a compatible database header file to be included in your application.
To do so, you first need to export the definition of the existing database into a schema definition file (.sdl
). A schema definition file contains definitions for the database components such as tables, keys and sets. To create a schema definition file, take the following steps:
- Execute
rdmexport
against your RDM 12 database using the "-schema-only
" command-line option as follows.
$ rdmexport -schema-only -output dbname.sdl dbname
This creates a file named dbname.sdl
that only contains the database definition.
- Open
dbname.sdl
with a text editor. - Remove the "
COMMIT;
" line, which should be the last line of the file. - Save the file and exit the editor.