+A mariadb database instance is needed for both modes of the UI with the appropriate databases and tables in order for the back-end system to store and retrieve data.
+
+The pom.xml file supports the creation of an appropriate docker image for development purposes. The initialization scripts reside under the db-scripts directory.
+
+Also, a script has been developed, namely validation/docker/mariadb/deploy.sh which easily deploys the container. This script accepts the following items as input parameters:
+
+CONTAINER_NAME, name of the container, default value is akraino-validation-mariadb
+MARIADB_ROOT_PASSWORD, the desired mariadb root user password, this variable is required
+UI_ADMIN_PASSWORD, the desired Blueprint Validation UI password for the admin user, this variable is required
+UI_AKRAINO_PASSWORD, the desired Blueprint Validation UI password for the akraino user, this variable is required
+REGISTRY, registry of the mariadb image, default value is akraino
+NAME, name of the mariadb image, default value is validation
+TAG_PRE, first part of the image version, default value is mariadb
+TAG_VER, last part of the image version, default value is latest
+MARIADB_HOST_PORT, port on which mariadb is exposed on host, default value is 3307
+
+Currently, two users are supported for the UI, namely admin (full privileges) and akraino (limited privileges). Their passwords must be defined in the database.
+
+In order to build and deploy the image using only the required parameters, the below instructions should be followed:
+
+The mariadb root user password (currently the UI connects to the database using root privileges), the UI admin password and the UI akraino password should be configured using the appropriate variables and the following commands should be executed:
+
+.. code-block:: console
+
+ cd validation/ui
+ mvn docker:build -Ddocker.filter=akraino/validation:dev-mariadb-latest
+ cd ../docker/mariadb
+ ./deploy.sh TAG_PRE=dev-mariadb MARIADB_ROOT_PASSWORD=<root user password> UI_ADMIN_PASSWORD=<UI admin user password> UI_AKRAINO_PASSWORD=<UI akraino user password>
+ mysql -p<MARIADB_ROOT_PASSWORD> -uroot -h <IP of the mariadb container> < ../../ui/db-scripts/examples/initialize_db_example.sql
+
+In order to retrieve the IP of the mariadb container, the following command should be executed:
+
+.. code-block:: console
+
+ docker inspect <name of the mariadb container>
+
+Furthermore, the TAG_PRE variable should be defined because the default value is 'mariadb' (note that the 'dev-mariadb' is used for development purposes - look at pom.xml file).
+
+If the database must be re-deployed (it is assumed that the corresponding mariadb container has been stopped and deleted) while the persistent storage already exists (currently, the directory /var/lib/mariadb of the host is used), a different approach should be used after the image build process.
+
+To this end, another script has been developed, namely validation/docker/mariadb/deploy_with_existing_storage.sh which easily deploys the container. This script accepts the following as input parameters:
+
+CONTAINER_NAME, the name of the container, default value is akraino-validation-mariadb
+MARIADB_ROOT_PASSWORD, the desired mariadb root user password, this variable is required
+REGISTRY, the registry of the mariadb image, default value is akraino
+NAME, the name of the mariadb image, default value is validation
+TAG_PRE, the first part of the image version, default value is mariadb
+TAG_VER, the last part of the image version, default value is latest
+MARIADB_HOST_PORT, the port on which mariadb is exposed on host, default value is 3307
+
+In order to deploy the image using only the required parameters and the existing persistent storage, the below instructions should be followed:
+
+The mariadb root user password (currently the UI connects to the database using root privileges) should be configured using the appropriate variable and the following commands should be executed:
+
+.. code-block:: console
+
+ cd validation/docker/mariadb
+ ./deploy_with_existing_persistent_storage.sh TAG_PRE=dev-mariadb MARIADB_ROOT_PASSWORD=<root user password>
+
+Finally, if the database must be re-deployed (it is assumed that the corresponding mariadb container has been stopped and deleted) and the old persistent storage must be deleted, the directory on the host machine where data is stored should be first deleted (note that all database's data will be lost).
+
+To this end, after the image build process, the following commands should be executed: