Reputation: 2128
I am looking for a database that can I run SQL statements on without having to have a database server installed. I.e. I need the ability to select/insert/update a database given only the database file and any external libraries.
Here is my situation:
Here are my requirements:
I believe this is possible with MS Access *.mdb files using ADO or JET or something like that, however, I would like to hear some alternatives. Please provide the database and the C++ engine/libraries in your answer.
My priorities are:
Thank you all.
Upvotes: 4
Views: 1373
Reputation: 37174
You need to look into SQLite. It is perfect for this scenario and very easy to use. It is vastly popular (large community), compact, cross-platform, and simple to use.
There are SQLite implementations for other languages too. For instance, you can also access SQLite databases using C#. There is even a Linq-to-SQLite.
Upvotes: 6
Reputation: 368261
You cannot go wrong with SQLite here.
It is small enough to be embedded in many apps (see e.g. here for a list of famous apps ranging from Photoshop to Apple Mail + Safari, Dropbox, Firefox, Chrome, Skype and more), yet complete enough to cover most SQL aspects you may need. Great support too, and wide coverage in terms of APIs and languages.
It can have issues with locks and multiple write accesses. But for a single client it should work perfectly fine.
Upvotes: 5