Installation and administration

1 INSTALLATION

1.1 Installing on Windows

To install NitrosBase on Windows, just run the setup file nbsetup.exe

Operating system requirements

  • Windows Server 2016 and higher
  • Windows 10

Hardware requirements

  • The number of processor cores ≥ 4;
  • Processor frequency ≥ 2.0 GHz;
  • RAM ≥ 16 GB;
  • Hard disk space (SSD preferred) ≥ 128 GB.

Demo database deployment

Open terminal and change directory to bin (where nbase located) and execute the commands:

  1. Create the sntest1 demo database:
    nbase sntest1 -c create -p 3020

  2. Fill the database with demo data:
    nbase -p 3020 -q < ../samples.data/sntest1/prepare.sql

  3. Execute simple demo query:
    nbase -p 3020 -q "select name, lastname, age from person limit 10"

1.2 Installing on Linux

To install NitrosBase under Linux, it is enough to unzip the distributive package into any directory.

Operating system requirements

  • Ubuntu 16.0 and higher

Hardware requirements

  • The number of processor cores ≥ 4;
  • Processor frequency ≥ 2.0 GHz;
  • RAM ≥ 16 GB;
  • Hard disk space (SSD preferred) ≥ 128 GB.

Demo database deployment

Open terminal and change directory to bin (where nbase located) and execute the commands:

  1. Create the sntest1 demo database:
    ./nbase sntest1 -c create -p 3020

  2. Fill the database with demo data:
    ./nbase -p 3020 -q < ../samples.data/sntest1/prepare.sql

  3. Execute simple demo query:
    ./nbase -p 3020 -q "select name, lastname, age from person limit 10"

2 ADMINISTRATION

The nbase program allows you to administer NitrosBase databases.

To work in terminal mode, you can use CLI (Command Line Interface) commands.

Also, nbase is a web server for remote administration using a standard web browser.

2.1 Command Line Interface

The nbase program (utility) provides a command line interface for basic database administration operations.

nbase [dbname] [options] 

OPTIONS:

--help   
 -h                  -- show this help 
   
--command=<command> 
 -c <command>  	     -- command:
                        create    - create new database and start server for it
                                    (dbname and port are required)
                        open      - start server for database specified
                                    (dbname and port are required)
                        close     - stop server of database specified
                                    (port is required)
                        backup    - backup database specified
                                    (port is required)
                        restore   - restore database specified
                                    (dbname, port and backuppath are required)
--port=<port>
 -p <port>     	     -- TCP port listened by server

--folder <path>      
 -f <path>           -- path to folder where database will be created
                        default is setuppath/data 
                        (c:/nitrosbaseuni/data for windows)

--query="sqlcommand"
 -q "sql command"    -- execute SQL query against database specified
                        (port is required);
                        if query is omitted, it will be red
                        from standard input

-b <path>            -- backup path

-t                   -- terminate nbase background process

Usage 2:
nbase a              -- start admin panel

Examples

Creating and running a database

nbase sntest1 -c create -p 3020

By default, the database is created in the setuppath/data directory (c:/nitrosbaseuni/data folder for windows).

If you need to create database in another directory, use parameter -f

nbase sntest2 -f d:\tmp -c create -p 3021

Running the existing database

nbase sntest1 -c open -p 3020

Closing the Database

nbase -c close -p 3020

Running SQL query

nbase -p 3020 -q "select * from person limit 10"

Running SQL query from file

nbase -p 3020 -q < query.sql

2.2 Database administrator Web Interface

Database administrator Web Interface will be available with NitrosBase 2.2

NitrosBase Admin is the database management application for NitrosBase DBMS. It supports all the functions necessary for managing NitrosBase: from writing simple SQL queries to developing complex databases. NitrosBase Admin supports Windows and Linuxoperation systems.

To run it on Windows you need to enter Start menu, in the folder NitrosBase click NitrosBase Аdmin. NitrosBase Admin Web application will start in your Web Browser.

To run the application under Linux, run the command

nbase a 

You can also launch the browser and type the URL: 127.0.0.1:8000

The program interface is presented by:

  • the main menu located at the top of the page;
  • the left panel containing the tree of management objects (databases, tables, columns, indexes): for example, the program provides a test database;
  • the query area that allows you to create and run each query in a separate tab;
  • the data area displaying query results.

To create databases and perform operations on the database objects, a context menu is provided containing commands for creating, changing, and deleting database objects. All changes made in the database are displayed in the object tree in the left pane.

To work with queries, a separate section of the Query menu has been created in NitrosBase Admin, which allows you to create, run, save, open saved queries, etc.

For your convenience, the Help section provides information resources to help you in working with this application.

2.3 The catalog structure

The unpacked installation contains the following directories

  • bin — DBMS server and client executable files, some libraries
  • data — folder in which the databases are created
  • include — C/C++ Header files
  • samples.c++ — С++ examples
  • samples.java — Java examples
  • samples.data — test database data