Get Started

Sorry, your browser does not support inline SVG.

Download, Execute and Go!

YottaDB software starts with the language agnostic hierarchical key-value database. Around it, we have the Octo SQL engine, a management GUI, and plugins. Language wrappers provide YottaDB APIs for languages other than C and M, which are both included with the core YottaDB database.

Try YottaDB - It's Easy!

Linux

After ensuring that prequisites are installed, you can install YottaDB software on your physical or virtual Linux machine.

Virtual Machine

The Acculturation Guide virtual machine has prerequisites installed, and is ready for you to install YottaDB software.

Docker

A ready-to-run Docker container that has both prerequisites and the latest YottaDB installed.

Whatever method you choose, we have sample code for you to download to try our software.

Your Linux System

Supported platforms are:

  • Debian GNU/Linux on 64-bit x86, and 32- and 64-bit ARM.
  • Red Hat Enterprise Linux on 64-bit x86
  • SUSE Linux Enterprise on 64-bit x86
  • Ubuntu on 64-bit x86

For supported versions of each platform, check the platforms section of the release notes for the current YottaDB release.

Prerequisite Software

YottaDB and its plugins require a number of common Linux utility programs, tools, shared libraries, and header files. The ydbinstall / ydbinstall.sh script for installing YottaDB checks for prerequisites needed by the software requested to be installed, and reports any that are missing. Use the package manager of your Linux distribution to install any missing prerequisites.

With prerequisites installed, see the Install YottaDB section below to install YottaDB.

Acculturation Guide Virtual Machine

The Acculturation Guide is a self-paced introduction to YottaDB administration and operations. It includes a Debian GNU/Linux x86_64 virtual machine disk image that you can download and run with your preferred virtualization software, such as QEMU, Virtual Box, Hyper-V, Parallels, or VMware. Boot it with 512MB RAM (or more).

You should configure the virtual machine to have host ports of your choice forwarded to ports on the guest for ssh, and optionally Rocto (the Octo server) and the GUI if you want to use them.

  • The virtual machine has an ssh server listening at its standard port, 22. You can login as user ydbuser and password YottaDB Rocks!.
  • After logging in, follow the Install YottaDB instructions below.
  • If you want to connect to Octo from a remote client, you will need to forward a port to connect to Rocto, which listens at port 1337 by default.
  • If you want to use the GUI, you will need to forward a port to connect to its web server, which listens at port 9080 by default.

With the virtual machine booted, see the Install YottaDB section below to install YottaDB.

Install YottaDB

The ydbinstall.sh script downloads and installs YottaDB and plugins. Download the script in a temporary directory, and make it executable, e.g.:

mkdir /tmp/tmp && cd /tmp/tmp && wget https://download.yottadb.com/ydbinstall.sh && chmod +x ydbinstall.sh

 

Use the script to install YottaDB and plugins, e.g.

sudo ./ydbinstall.sh                             # Quiet basic installation
sudo ./ydbinstall.sh --verbose                   # Basic installation
sudo ./ydbinstall.sh --utf8                      # YottaDB installation with UTF-8 support
sudo ./ydbinstall.sh --utf8 --octo --gui         # YottaDB installation with UTF-8 support, Octo, and the GUI
./ydbinstall.sh --help                           # Output a complete list of ydbinstall options
sudo ./ydbinstall.sh --utf8 --allplugins         # YottaDB installation with UTF-8 support and all plugins

 

Remember to return to your working directory after installing YottaDB. After installing YottaDB, you can install wrappers (APIs) for supported languages.

Install Language Wrappers

Go

Install the Go API:

export GOPATH=$PWD
export GO111MODULE=off
go get -d lang.yottadb.com/go/yottadb

 

Lua

Install the Lua API:

git clone https://github.com/anet-be/lua-yottadb.git
cd lua-yottadb
sudo make install  # Omit sudo in the Docker container
cd ..

 

Node.js

Install the node.js module:

npm install nodem

 

Perl

You can install the Perl extension using cpan:

sudo cpan YottaDB # Note: hit ENTER when prompted to use defaults

or use a faster method which takes a few more steps:

git clone https://gitlab.com/oesiman/yottadb-perl.git
cd yottadb-perl
perl Makefile.PL
make
sudo make install
cd ..

 

Python

Install the Python package:

python3 -m pip install yottadb

 

Rust

The cargo command used to run the sample YottaDB Rust program automatically installs the YottaDB Rust wrapper.
Once YottaDB is installed, see the Initializing a YottaDB Environment below.

Initializing a YottaDB Environment

The operation of YottaDB is controlled by environment variables. Sourcing the ydb_env_set file creates a YottaDB environment and database under $HOME/.yottadb. If your working directory is elsewhere, set the environment variable ydb_dir to that directory, e.g., export ydb_dir=/tmp/test.

. /usr/local/etc/ydb_env_set

 

You should do this on every login session; alternatively put it in a file where it will be executed on each session (.login, .bash_login, or bash_profile for bash). The command also recovers the database in the event that it was not shut down cleanly. After sourcing the ydb_env_set file, you are ready to use YottaDB.

Starting the Rocto Server

If you installed Octo, you can use Rocto to connect to Octo using an ODBC/JDBC client. Create a userid and password of your choice with the command:

yottadb -run %ydboctoAdmin add user demo --readwrite

 

Then start the Rocto server, which listens on TCP port 1337 by default.

rocto --readwrite

 

Starting the GUI

If you installed the GUI, you can start it with the command, which listens at port 9080 by default:

yottadb -run %ydbgui --readwrite

Docker Container

Docker Hub has prebuilt YottaDB images. You must have at least Docker 17.05. The Docker image supports volumes, for persistence and for sharing code and routines between host and container, by mounting a host directory at /data in the container.

The ·yottadb-debian:latest container has current YottaDB, Octo, and the GUI already installed. Running it provides you with a initialized environment which is ready to use. To start a container with host ports forwarded, use a command such as:

docker run -p 9080:9080 -p 1337:1337 -it --rm -v $(pwd)/ydb-data:/data download.yottadb.com/yottadb/yottadb-debian:latest

 

If you want to access a database from multiple containers (e.g., to manage containers with an orchestration tool such as Kubernetes), they will need to share IPC resources and pids because of YottaDB’s in-memory database engine. Use a command such as:

docker run -p 9080:9080 -p 1337:1337 -it --rm -v $(pwd)/ydb-data:/data --hostname=ydbcontainer --ipc=host --pid=host download.yottadb.com/yottadb/yottadb-debian:latest

 

The userid for the Rocto server is ydb and the password is ydbrocks.

Use YottaDB

YottaDB includes APIs for C and M.

C

Download the sayhelloC.C program, compile it, and run it:

wget https://docs.yottadb.com/AcculturationGuide/sayhelloC.c
gcc $(pkg-config --libs --cflags yottadb) -o sayhelloC sayhelloC.c -lyottadb
./sayhelloC

 

Go

Download the sayhelloGo.go program, compile it, and run it:

wget https://docs.yottadb.com/AcculturationGuide/sayhelloGo.go
go build sayhelloGo.go
./sayhelloGo

 

Lua

Download the sayhelloLua.lua program and run it:

wget https://docs.yottadb.com/AcculturationGuide/sayhelloLua.lua
lua sayhelloLua.lua

 

M

Download the sayhelloM.m program to the r/ subdirectory (which is created by the Initializing a YottaDB Environment step and exists in the Docker container), and run it.

wget -P $ydb_dir/r/ https://docs.yottadb.com/AcculturationGuide/sayhelloM.m
yottadb -run sayhelloM

 

Node.js

Downlad the sayhelloNode.js program and run it:

wget https://docs.yottadb.com/AcculturationGuide/sayhelloNode.js
node sayhelloNode.js

 

Perl

Download the sayhelloPerl.pl program, make it executable, and run it:

wget https://docs.yottadb.com/AcculturationGuide/sayhelloPerl.pl
chmod +x sayhelloPerl.pl
./sayhelloPerl.pl

 

Python

Download the sayhelloPython.py program, and run it.

wget https://docs.yottadb.com/AcculturationGuide/sayhelloPython.py
python3 sayhelloPython.py

 

Rust

Create a package for the sayhello_rust.rs program. Using cargo to compile and run the program downloads the API.

cargo new sayhello_rust
cd sayhello_rust
echo 'yottadb = "2.0.0"' >> Cargo.toml
curl https://docs.yottadb.com/AcculturationGuide/sayhello_rust.rs >src/main.rs
cargo run
cd ..

For other languages, install APIs for your preferred language.

Many Languages, One Database!

Output the data from the database, with each node set from a different program.

$ mupip extract -select='hello' -stdout
YottaDB MUPIP EXTRACT /usr/local/lib/yottadb/r136/mupip extract -select=* -stdout UTF-8
08-FEB-2023  15:26:32 ZWR
^hello("C")="Hello, world!" 
^hello("Go")="สวัสดีชาวโลก" 
^hello("Lua")="Hallo Wereld"
^hello("M")="Привіт Світ" 
^hello("Node.js")="مرحبا بالعالم" 
^hello("Perl")="Grüẞ Gott Welt" 
^hello("Python")="नमस्ते दुनिया" 
^hello("Rust")="ハローワールド" 
%YDB-I-RECORDSTAT, ^hello: Key cnt: 8 max subsc len: 16 max rec len: 37 max node len: 48 
%YDB-I-RECORDSTAT, TOTAL: Key cnt: 8 max subsc len: 16 max rec len: 37 max node len: 48

 

The YottaDB database is natively accessible from many languages!

Use Octo

The Docker Container includes Octo as well as the tables and data from the Northwind database adapated for Octo. With Octo installed on your machine or virtual machine you can download the data, and the SQL DDL statement to create tables:

wget https://gitlab.com/YottaDB/DBMS/YDBOcto/-/raw/master/tests/fixtures/northwind.zwr
wget https://gitlab.com/YottaDB/DBMS/YDBOcto/-/raw/master/tests/fixtures/northwind.sql
mupip load northwind.zwr # load the data
octo -f northwind.sql    # laod the table definitions

 

You can now run Octo in a terminal session following examples in the Octo user documentation, e.g.

ydbuser@ydbdev:~$ octo
OCTO> SELECT * FROM Products WHERE ProductName LIKE 'L%';
PRODUCTID|PRODUCTNAME|SUPPLIERID|CATEGORYID|UNIT|PRICE
65|Louisiana Fiery Hot Pepper Sauce|2|2|32 - 8 oz bottles|21.05
66|Louisiana Hot Spiced Okra|2|2|24 - 8 oz jars|17
67|Laughing Lumberjack Lager|16|1|24 - 12 oz bottles|14
74|Longlife Tofu|4|7|5 kg pkg.|10
76|Lakkalikööri|23|1|500 ml |18
(5 rows)
OCTO> SELECT * FROM Customers WHERE Country='France'LIMIT 5;
CUSTOMERID|CUSTOMERNAME|CONTACTNAME|ADDRESS|CITY|POSTALCODE|COUNTRY
7|Blondel père et fils|Frédérique Citeaux|24, place Kléber|Strasbourg|67000|France
9|Bon app'|Laurence Lebihans|12, rue des Bouchers|Marseille|13008|France
18|Du monde entier|Janine Labrune|67, rue des Cinquante Otages|Nantes|44000|France
23|Folies gourmandes|Martine Rancé|184, chaussée de Tournai|Lille|59000|France
26|France restauration|Carine Schmitt|54, rue Royale|Nantes|44000|France
(5 rows)
OCTO> exit
ydbuser@ydbdev:~$ 

 

With the Rocto server running, you can connect using a client such as SQL Workbench/J. On this page are screenshots of the connection screen using the PostgreSQL driver, showing the userid and password, as well as a screenshot of the same Northwind database query as the last example. You can also connect using DBeaver, SquirrelSQL, as well as Microsoft PowerBI and Excel.

Here is a screenshot of the connection screen using the PostgreSQL driver, showing the userid and password.

Here is a screenshot of the same Northwind database query as the last example.

Use the GUI

Just connect a browser to listening GUI server. The screenshots below are from a browser connected to port 9080 in an Acculturation Guide virtual machine.

Explore All YottaDB Projects at GitLab

As all YottaDB software is 100% free / open source, you will find all our work on Gitlab.