Chapter 7. Updating Your VoltDB Database


VoltDB Home » Documentation » Using VoltDB

Chapter 7. Updating Your VoltDB Database

Unlike traditional databases that allow interactive SQL statements for defining and modifying database tables, VoltDB requires you to pre-compile the schema and stored procedures into the application catalog. Pre-compiling lets VoltDB verify the structure of the database (including the partitioning) and optimize the stored procedures for maximum performance.

The down side of pre-compiling the database and stored procedures is that you cannot modify the database as easily as you can with more traditional relational database products. Of course, this constraint is both a blessing and a curse. It helps you avoid making rash or undocumented changes to the database without considering the consequences.

It is never a good idea to change the database structure or stored procedure logic arbitrarily. But VoltDB recognizes the need to make adjustments even on running systems. Therefore, the product provides mechanisms for updating your database and hardware configuration as needed, while still providing the structure and verification necessary to maintain optimal performance.

7.1. Planning Your Application Updates

Many small changes to the database application, such as bug fixes to the internal code of a stored procedure or adding a table to the database schema, do not have repercussions on other components of the system. It is nice to be able to make these changes with a minimal amount of disruption. Other changes can impact multiple aspects of your applications. For example if you add or remove an index from a table or modify the parameters to a stored procedure. Therefore, it is important to think through the consequences of any changes you make.

VoltDB tries to balance the trade offs of changing the database environment, making simple changes easy and automating as much as possible even complex changes. Using the VoltDB Enterprise Edition you can add, remove, or update stored procedures "on the fly", while the database is running. You can also add or drop tables and columns from the schema, as well as modify many indexes.

To make other changes to the database schema (such as adding unique indexes) you must first save and shutdown the database. However, even in this situation, VoltDB automates the process by transforming the data when you restart and reload the database in a new configuration.

This chapter explains different methods for making changes to your VoltDB database application, including: