last updated September 13, 2007
Persistent C++ containers (map, multimap, set, list, and others) with standard STL interfaces and simple disk-file backup and storage.
The easiest way to add a simple database to your project.
Cross-platform.
Use them just like STL's containers, with only one exception: The constructor takes a filename. (That one sentence is the entire user manual )
mmap(2)
memory mapping or other fancy features. These containers were kept simple, to reduce the probability of bugs, and to keep the manual short.
save()
, which writes the container to its disk file. Call it to save data whenever you anticipate a crash.
StringDB is a fast object-oriented database (OODB) using persistent STL. It's single-user, non-relational, non-SQL, and memory-resident.
At last, a database made for C++! StringDB is based on a map<string, string>
, where the key values are strings of the form "objectname[.membername[.submembername[...]]]
", just like names in C++ and Java.
Unlike relational databases, StringDB has structs, not rows, and just as in Java and JavaScript, you can add new members to any struct at runtime, as needed,
without seeking the permission of your database administrator first, and without the side effect of adding the same members to all objects of the same type.
With StringDB, there is no law saying every row must have the same format (all the same columns).
And unlike the simple map template that C++ provides, a StringDB lets you index multiple fields of your choice for quick lookup.
StringDB gives you features only found in interpreted languages like Java:
A small function library lets you store integers and timestamps as strings.
It doesn't have an SQL interface -- it has a C++ interface.
Don't try to build one of these at home! Testing it to perfection would take much more than $5 worth of your time.
Persistent Containers are provided in one edition:
string
, which I find the most useful).
As of September 13, 2007, the Persistent Containers
templates (Gold Edition) are available.
Copyright © 2002-2007 J. E. Brown all rights reserved. Los Alamos, NM USA
[Persistent database software by J. E. Brown -- p. 1]