Itzam
A Deliberately Portable Embedded Database Engine
Itzam creates and manipulates files containing variable-length, random access records; your program
can retrieve and organize these records via a variety of index types. With version 3.0.0, Itzam added support for file locking and transactions with rollback. Currently supported index types include:
-
B-tree
A B-tree index stores and retrieves indexes by a program-defined key value — for example, a string or a number that uniquely identifies the content of the record. B-tree indexes also maintain a programmer-defined order for keys, thus allowing sequences of records to be retrieved in alphabetic or numeric order. -
Hash Table
The hash table index allows record access via key, and is both smaller and faster than the B-tree indexes. However, a hash index does not allow in-order (sequential) access to records, so both types have their advantages and applications. The same data can be referenced by both kinds of indexes. -
Sparse Matrix
In a sparse matrix index, records can be referenced by their column and row coordinates in a two-dimensional grid. This is extremely fast, and useful for tabular data (as in spreadsheets). -
Future Index Types
Geographical (longitude and latitude), 3D, and semantic (e.g., Bayesian) indexes are in development.
Itzam is very flexible, allowing records of different types to be mixed in the same files or indexes. The library's foundation is a core library written in deliberately portable, low-level C. This library can be used directly, or from within a higher-level language wrapper. Wrappers available or in development include:
-
ANSI/ISO C++
The C++ implementation defines a set of templates for both simple and complex database classes, and supports B-tree indexes with unique or duplicate keys. Itzam/C++ also includes built-in multithreaded resource locking. Complete class documentation is embedded in the source code. Version 1.0.0 lacks a tutorial, although the included itzam_cpp_exercise.cpp program demonstrates nearly all features of the library. -
Java
Itzam/Java is a Pure Java reimplementation of the Itzam engine that is interoperable with files created by Itzam/Core. Since Itzam/Core is the basis of wrappers written in languages such as C++ and Python, Itzam/Java is compatible with those language libraries as well.
Initially, Itzam Core supports indexes based on the venerable B-tree algorithm, future versions will include indexes that use hash, semantic analysis, and Bayesian logic.
Features
-
Small Footprint
Itzam/Core adds less then 8K bytes to a program when linked statically. -
Portability
Itzam is deliberately portable across operating systems and platforms. A database created on Windows is readable by an Itzam application on a Linux machine. The current release ships with support for building and testing on Unix, Linx, and Windows operating systems. -
No Dependencies
Itzam does not have any dependencies on external libraries or components, beyond the common elements included with every Standard C or Java compiler. -
Scalability
Itzam supports various levels of complexity and abstraction, based on your needs and the environment inhabited by your application. Itzam has been successfully used in commercial and open source applications on platforms ranging from Linux clusters to embedded cell phone processors. -
Multiuser/Multiprocess/Multithread
File locking supports safe and simultaneous access to database files for multiple processes, threads, and users. -
Flexibility
Build your databases with indexes embedded in data files, or separate key information for the data it references, to provide different indexing schemes for different purposes. Iterator selectors provide flexible filtering to define subsets of a database. A database created in Itzam/Core or C++ is usable by an Itzam/Java program; for example, heavy-duty database generation can be accomplished using the high-speed native code of Itzam/Core, and the result is available to servlets or applications written using Itzam/Java. -
I/O Choices
You can choose between POSIX or Standard ANSI/ISO C I/O libraries. By default, Itzam/Core uses POSIX I/O for speed and reduced code size; however, defining the symbol STDC_IO during compilation will cause the library to use the more universal Standard C I/O functions. The GNU toolchain configure script has an option, --enable-stdcio, to activate this flag. -
Dual Licensing, GPL and Commercial
Itzam can be licensed under either the GNU General Public License (GPL) or a simple non-free (closed-source) license. The GPL version is provided as is without support, while the commercial license provides technical assistance and notice of updates and bug fixes. -
64-bit File Access
Itzam is designed with 64-bit addressing in mind, and works with 64-bit Sun Solaris and 64-bit Linux. The Java implementation is locked into 64-bit file operations by nature of the Java language; while Itzam/Core can be compiled for 32-bit file operations, it must be compiled in 64-bit mode to interact with Java-generated databases. -
C++, Java, Python, and Fortran 95 Abstractions
The core library, written in ANSI C, operates at a low-level, working directly with the operating system. While a low-level library can be a powerful tool for embedde3d and small systems, large-scale projects can benefit from a higher-level of abstraction. Development and testing is underway for C++, Python, and Fortran 95 "wrappers". The Java implementation stand alone as a Pure Java reimplementation of the Itzam engine. -
Documentation
I've written tutorial and API documentation to accompany Itzam/Core. A complete example application, a contact database, is the basis for the tutorial. More tutorial information will be made available as time and financing permit.
Why Itzam?
Naming new projects is always difficult; I sometimes think every word in English has been
appropriated by someone. So I've had to stretch my linguistic horizons. "Itzam" is the Mayan word for iguana;
given the fondness of iguanas for trees, and the presence of an iguana in my office,
the name seemed rather fitting. The Itzam logo is my own design, drawn in
Inkscape
and modified with The Gimp.
Other software used in the production of Itzam and this web site:
Quanta,
Abiword,
and Glade.

