CREATE STORE, DROP STORE, ALTER STORE

Stores are just folders or directories on a computer. By creating a store you are creating knowledge in the database of the existence of this folder. You can then use this folder in your Orixa database procedures, by referring to the Store.

Stores are used to

  1. Hold Backup files to keep safe older versions of your data.
  2. Hold CSV, XML or other data-files which will be used to import data into the database.
  3. Hold Update files, which contain change-data for your database. Update files can be transferred between instances of your database to keep them synchronized.
  4. Facilitate the transfer of files between instances of your database.
  5. Custom-procedures may run other processes in your Orixa App. For example creating PDF files containing data. In such cases a store may be defined as the destination for files created in this process.

SQL Syntax and examples

Stores can be local or remote. The SQL is different for the two options

Local Store

CREATE STORE "StoreName" AS  
LOCAL PATH 'c:\any-path'

Remote Store

CREATE STORE "StoreName" AS
REMOTE ADDRESS 'IP Address 255.255.255.255'
PORT [number usually in range 12010-12100]
USER "UserName"
PASSWORD 'YourPassword'
STORE "RemoteStoreName"

ALTER or DROP Store

This syntax is simple:

DROP STORE "StoreName"

To ALTER a store, simply replace CREATE with ALTER in the create store statement.