rdm-create

Database creation tool

Synopsis

rdm-create [OPTION]... dbname[.sdl|.cat]

Description

rdm-create is a command-line utility that creates an RaimaDB database from a database definition file (.sdl) or a compiled catalog file (.cat). The database will not be populated with data. Only the catalog file will be generated.

The database will be created in the default Document Root (docroot) directory. A command-line option ('--output') is provided to allow the database to be created with a different base name or on a remote TFServer. Examples of TFS URIs:

'tfs-tcp://localhost:21553', 'tfs-shm://MY_TFS'.

Options

Short options can be combined into one string starting with a single '-'. Mandatory arguments to long options are mandatory for short options too. Long option arguments can also be specified in a separate argument.

-h, --help Display this usage information
--version Display the version information
-q, --quiet Quiet mode. No information will be displayed
--key=key Specify the encryption key for the database ([algorithm:]passcode). The valid algorithms are xor, aes128, aes192 and aes256. The AES algorithms are only available for packages that have strong encryption support. If an algorithm is not specified, the default is aes128 for strong encryption packages and xor otherwise.
--docroot=path Document root to use instead of the current working directory. The environment variable RDM_DOCROOT can also be used. (See Document Root (docroot))
-f, --force Overwrite an existing destination database
--use-ssl Use SSL for remote connections
-o, --output=db-uri | tfs-uri The database to be created. If a tfs-uri is provided, it implies the base name (dbname) specified for the database definition file will be used as the database name on the target tfs-uri.
-L, --collate=collation-id The string collation locale the database will use
dbname[.sdl | .cat] Name of database definition file (.sdl) or RaimaDB database catalog file (.cat)

Usage Examples

The usage examples assume that bookshop.sdl contains the following table definition:

CREATE TABLE author (
    last_name CHAR(13) PRIMARY KEY,
    full_name CHAR(25),
    gender CHAR(1),
    yr_born SMALLINT,
    yr_died SMALLINT,
    short_bio VARCHAR(216),
    KEY yob_gender_key(yr_born, gender)
);

Creating an RaimaDB database

You can run rdm-create to create an RaimaDB database from a database definition file.

$ rdm-create bookshop.sdl

A RaimaDB database, bookshop, will be created as the result. The database consists of its own directory named bookshop.rdm in which the internal database files will be stored.

To create a database named 'myBookshop' on a remote TFS named 'myRemote':

$ rdm-create --output=tfs://myRemote/myBookshop bookshop.sdl