To understand the basics of how VoltDB works, it is useful to take a look at a simple example application. Programming tools traditionally use "Hello, World" as their example, so we shall as well.
There are many tools, such as integrated development environments (IDEs) and language-sensitive editors, that can make your development effort easier. However, to keep the example simple, we will not assume any additional tools beyond VoltDB, Java, and a text editor.
At its most basic, VoltDB is a database and stores and retrieves data from database tables. So for our Hello World application we will store the words "hello" and "world" in the database and then retrieve them. To make it a little more interesting, we will store the two words in multiple languages in separate fields in the database table. The language will be used as the primary key for the table.
Section 3.1 explains how to set up a working environment for the tutorial.
Section 3.2 explains how to create the SQL DDL file that defines the database schema.
Section 3.7 explains how to declare and partition your stored procedures.
Section 3.8 explains how to write the Java client application that will interact with the database.
This document walks you through the exercise of creating each of the source files you need for the Hello World
application and explains what they do. You can find a complete listing of the sources files in Appendix A, The Completed Hello World Application, as well as online in the
doc/tutorials folder after you install the VoltDB
As with any application, it is always best to start with a clean slate. Create a new directory to use as a workspace and set default to that directory:
$ mkdir helloworld $ cd helloworld
We will use this directory for storing all of the files we create for the Hello World application.