Quick Data Storage Introduction
Before we start explaining how to create the database from the schema we just put together in How to Create a Schema, we should decide where to store the database. RDM uses a concept similar to a web server document root directory. The directory can be: designated programmatically through API calls; defined by a system environment variable; or, defined as the current working directory as long as it is not the root directory of the file system.
For most of the examples in the Quickstart Tutorials, the Document Root (DOCROOT) will be assumed to be the current working directory.
In the docroot directory, the database will be stored in a directory named using the database name and a .rdm
extension. For example, the bookStore
database will be located in the bookStore.rdm
folder in the docroot directory. This implies that the name of the database can only use acceptable file name characters in the database name and, for systems where names are case-sensitive, the database name will be case-sensitive.
Raima Best Practices for working with the docroot is to always specify the location rather than using the current working directory. A simple way to change the default docroot is to use an environment variable, RDM_DOCROOT
.
Windows
$> mkdir C:\RDMDATA $> set RDM_DOCROOT=C:\RDMDATA
Linux/UNIX
$> mkdir ~/RDMDATA $> export RDM_DOCROOT=~/RDMDATA
This topic of how and where RDM stores data will be covered in more depth in the Database Storage section of this manual.
In-memory databases are an advanced topic we will discuss in more detail in the In-Memory Database (IMDB) section.