CppCMS does not enforce you to use any particular SQL Connectivity library however, the project provides two useful libraries:
- CppDB - stand alone C++ Connectivity library that supports MySQL, PostgreSQL, Sqlite3 databases and generic ODBC drivers.
- DbiXX - C libdbi library wrapper - deprecated, use CppDB instead for new projects.
These libraries are not directly connected to CppCMS, but they were built to be useful for web development (and not only web ones).
There are other libraries like SOCI, QtSql and many others that provide similar functionality, however each one has its own drawbacks (from CppCMS author's point of view).
In fact SOCI was one of the major libraries that inspired me in both DbiXX and CppDB development and it is a very nice library in general that can be used with CppCMS (and in fact I had used it for a while with one of my projects)
If you plan to use other libraries, I recommend that you take the following into account:
- Does it uses prepared statements or provide auto-escaping? This is the most important feature. It should be a straightforward operation. Otherwise, you may be victim of SQL Injections.
- Is it exception safe and does it provides exception safe transactions?
- Does it support more than one database engine? Is this support good enough?
These are very important points that should be taken in consideration. The first two are mandatory for web development with CppCMS, the third one would prevent from you vendor lock-in.