Creating a Database

A NuoDB database is comprised (at minimum) of one Storage Manager (SM) and one Transaction Engine (TE) on one or more hosts in a NuoDB domain. Whether creating a simple database on a single laptop or creating a database for scale-out across multiple data centers, the process is the same.

When creating a minimal database consisting of one SM and one TE, the following is required:

  1. Create an archive object
  2. Create a database object
  3. Start an SM on the archive object created in the first step.
  4. Start a TE

Note: Steps 3 and 4 do not require explicit invocation of NuoDB's start process command.

This section provides guidelines on the components of database creation using NuoDB Command.

Creating a NuoDB Database Archive

nuocmd create archive --db-name <database name> --server-id <server ID> --archive-path <full path>

Example

nuocmd create archive --db-name db1 --server-id server0 --archive-path /var/opt/nuodb/production-archives//db1

For more details on creating archives, see Creating an Archive.

Creating a NuoDB database

nuocmd create database --db-name <database name> --dba-user <userame> --dba-password <password> --te-server-ids <server ID>

Example

nuocmd create database --db-name db1 --dba-user dba --dba-password goalie --te-server-ids server0

For more details on creating databases, see Creating a Database.