Create and populate an RDM 15.2 database

The SQL file created in the "Export the Existing Data" section contains all the information necessary to create a fresh RDM 15.2 database and populate it with the existing data.

RDM 15.2 provides a data import utility named rdm-import. This utility takes an SQL file that contains tables defined in SQL DDL as well as SQL INSERT statements, including but not limited to the SQL files generated by rdmexport in RDM 12.

Create and populate an RDM 15.2 database

To create and populate a new database in RDM 15.2 based on an SQL file, execute rdm-import as follows.

$ rdm-import dbname.sql

This creates a new database named dbname and populates it with the data contained in the SQL file. There will be a directory named dbname.rdm, in which all the data files (called "pack") will be stored.

Create an RDM 15.2 database header file (optional)

If you created a schema definition file (.sdl) compatible with RDM 15.2 by taking the optional steps outlined in the "Export the Existing Data" section, you can create a database header file that can be included in your Core application, using the rdm-compile utility that comes with RDM 15.2.

To create an RDM 15.2 database header file, execute rdm-compile as follows.

$ rdm-compile --c-structs dbname.sdl

This creates a header file named dbname_struct.h, which contains the C structure definitions for the tables and keys, as well as the enumerated values that represent tables, columns, keys and sets. Include this file in your application that needs to access the RDM 15.2 database using the Core API.