views:

777

answers:

4

I'm looking for a light-weight database library that I can compile into a C++ application.

Does any such exist?

+10  A: 

SQLite. Not flat-file, but it is file based, can be easily embedded in apps.

vartec
Thanks for the suggestion :) . SQLite is clearly the most popular choice on stack overflow :P ... +1
Alterlife
+2  A: 

For pure XML embedded database you might want to peek at Oracle Berkeley DB XML.

Marcin Gil
not flat but nice.
Robert Gould
This appears to be exactly what I need. Thank you.
Alterlife
A: 

You can also look at berkleyDB

From wikipedia:

Berkeley DB (BDB) is a computer software library that provides a high-performance embedded database, with bindings in C, C++, Java, Perl, Python, Ruby, Tcl, Smalltalk, and many other programming languages. BDB stores arbitrary key/data pairs as byte arrays, and supports multiple data items for a single key. BDB can support thousands of simultaneous threads of control or concurrent processes manipulating databases as large as 256 terabytes, on a wide variety of operating systems including most Unix-like and Windows systems, and real-time operating systems.

Kasprzol
+2  A: 

Maybe this very lightweight XML library can also be of help: RapidXML. It's an XML parser, not a database library, but depending on your application that might be enough (you mention a flatfile XML data storage).