ArangoDB, a free NoSQL database system

About ArangoDB

In the following article we are going to take a look at how you can easily install ArangoDB on Ubuntu 20.04. For those who don't know, this is an open source NoSQL database system, easily managed via the built-in web interface or command line interface.

ArangoDB is a free and open source native multi-model database system developed by ArangoDB GmbH. The database system supports three data models (key / value, documents, graphics) with a database core and a unified query language AQL (ArangoDB Query Language). This query language is declarative and allows the combination of different data access patterns in a single query. ArangoDB is a NoSQL database system, but AQL (ArangoDB Query Language) is similar in many ways to SQL.

General characteristics of ArangoDB

  • This database system It has a Community version and an Enterprise version, which requires a license.
  • ArangoDB provides scalable queries when working with graphical data.
  • The database use JSON as default storage format. Internally it uses VelocyPack from ArangoDB, a fast and compact binary format for serialization and storage.
  • This database system you can natively store a nested JSON object as a data entry within a collection. Therefore, it is not necessary to disassemble the resulting JSON objects. The stored data would simply inherit the tree structure of the JSON data.
  • ArangoDB works in a distributed cluster and is certified for the data center operating system (DC/OS). DC / OS allows the user to implement ArangoDB in most existing ecosystems: Amazon Web Services (AWS), Google Compute Engine, and Microsoft Azure. Additionally, it provides one-click deployment for the user's cluster.
  • ArangoDB offers integration with native JavaScript microservices directly on top of the DBMS
  • using the Foxx framework, which is analogous to Node.js.
  • It has its own AQL (ArangoDB Query Language) and it also provides GraphQL for writing flexible native web services directly on top of the DBMS.
  • ArangoSearch is a new search engine feature in version 3.4. The search engine combines Boolean retrieval capabilities with generalized classification components that allow retrieval of data based on an accurate vector space model.

Install ArangoDB on Ubuntu 20.04

Installation is quite simple. Next we are going to see how to install ArangoDB in Ubuntu 20.04. Before we begin, let's make sure that all the packages in our system are updated and that we have some others necessary to proceed with the installation. We will achieve this by opening a terminal (Ctrl + Alt + T) and executing the commands in it:

install dependencies

sudo apt update; sudo apt upgrade

sudo apt install curl apt-transport-https

Install ArangoDB

To begin we are going to execute the following command to add the necessary repository to proceed with the installation:

echo 'deb https://download.arangodb.com/arangodb34/DEBIAN/ /' | sudo tee /etc/apt/sources.list.d/arangodb.list

We will continue importing the GPG key used to sign packages:

add arangodb repo

wget -q https://download.arangodb.com/arangodb34/DEBIAN/Release.key -O- | sudo apt-key add -

After this, we can install the ArangoDB software:

install arangodb

sudo apt update; sudo apt install arangodb3

During installation, it will ask us to write the root password.

root password configuration

If for some reason we cannot set the root password during installation, we can protect ArangoDB after installation by running:

sudo arango-secure-installation

Once the installation is complete, we will start the service and enable it to start on system reboot with the following command:

sudo systemctl start arangodb3

sudo systemctl enable arangodb3

Accessing the Shell

ArangoDB comes with a command line utility from which we can manage the databases. We will can connect to the shell with the command:

start shell

arangosh

Here we can Create a database, stop this example I'm going to call mydb, with the following command:

create db

db._createDatabase("mydb");

We will continue creating a database user with the commands:

create user

var users = require("@arangodb/users");

users.save("nombre-de-usuario@localhost", "tu-password");

Now we are going to grant all necessary privileges on the database mydb:

grant privileges

users.grantDatabase("nombre-de-usuario@localhost", "mydb");

Now we can exit shell typing:

leave arangodb

exit

Access to the web interface

The ArangoDB server comes with a built-in web interface for its administration. This allows you to manage databases, collections, documents, users, graphics, view server statistics and much more. We will can configure it by editing the file /etc/arangodb3/arangod.conf:

vim /etc/arangodb3/arangod.conf

Inside the file we will look for the line:

endpoint = tcp://127.0.0.1:8529

And we will replace with the following line:

change ip configuration arangodb

endpoint = tcp://dirección-ip-de-tu-servidor:8529

After this, we can save and exit the file. Now let's restart the ArangoDB service:

sudo systemctl restart arangodb3

Then we just have to open our web browser and direct us to http://dirección-ip-de-tu-servidor:8529, where we will see the login screen:

arangodb web interface

Once logged in, we will see a panel like the following to work.

arangodb web interface

For additional help or useful information, it is advisable to take a look at the official website of the project or the documentation that there can be found.


Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.