C++数据库接口 集合
下一代的C++标准可能会实现一个通用的数据库访问接口,看看提案,挺期望的:
http://isocpp.org/files/papers/n3612.pdf
这篇文章的另一大用处就是列出了C/C++已有的一些库, 我单独摘出来,不利用这个资源可惜了
ODBC
ODBC: http://msdn.microsoft.com/en-us/library/ms714562(v=vs.85)
unixODBC: http://www.unixodbc.org/
iODBC: http://www.iodbc.org/
ODBC is a standard database interface for C, released in 1992. Obviously the integration in C++ is quite poor, the code is very verbose and error handling is cumbersome. But ODBC itself is
well supported by vendors
JDBC
http://www.oracle.com/technetwork/java/javase/jdbc/index.html
JDBC is a Java binding, and as such not so relevant for a C++ library. But JDBC is extremely popular, and therefore included here. Interestingly, JDBC is one of the few database interfaces
to support arbitrary data types.
libpqxx
http://pqxx.org/development/libpqxx/
Libpqxx is a C++ binding for PostgreSQL. While database speci?c, and thus not generic, it o?ers a reasonable C++98 interface.
C interface for SQLite
http://www.sqlite.org/capi3ref.html
SQLite o?er a C/C++ binding that can be used for database access. Being C-based, it is quite cumbersome to use compared to C++ bindings.
Poco::Data Library
http://pocoproject.org/docs-1.5.0/category-POCO_Data_Library-index.html
The poco project o?ers a database library with a clean C++98 interface. It is easy to use, but its SQL-92 support is incomplete regarding data types and the separation between compilation and execution is weak.
SOCI
http://soci.sourceforge.net/
SOCI o?ers a very nice and powerful C++ interface for database access. It makes use of unusual constructs (comma operators, delayed side e?ects by destructors) to work around C++98 limitations. It is very generic and explicitly aims at supporting aribtrary data
types. Like poco, separation between compilation and execution is weak.
OTL
http://otl.sourceforge.net/home.htm
The OTL l