Hello friends,

I am evaluating Database connectivity from C++. I have found OTL(Oracle, Odbc and DB2-CLI Template Library ) from googling, which seems good for that purpose.
Can you please provide me some inputs / feedback about OTL (or other suitable DB handling libraries).
Also please inform, from where I can get the license cost (development, deployment & support) related information about that library.

Thanx & Regards,
Amit M.

Dani AI

Generated

A short, practical summary for and follow-ups to and .

OTL is a long‑standing, single‑header C++ template library (author Sergei Kuchin) that provides a thin, direct mapping to vendor client APIs (OCI/DB2/etc.) and to ODBC where native APIs aren’t used. Its project pages publish a permissive, BSD‑style "use/modify/redistribute" statement and an "as‑is" disclaimer — so the library itself normally carries no per‑seat development/deployment fees (vendor client libraries you link to may have their own terms). (otl.sourceforge.net)

Why pick OTL: it is minimal, fast, and keeps you close to SQL and the native driver features (array binding, large‑object handling, streaming semantics). That makes it a good choice when you want tight control and low overhead. Tradeoffs are that it’s lower‑level than modern C++ data layers (fewer built‑in ORM conveniences, pooling layers, or advanced cross‑DB abstractions). The project notes LOB and native/ODBC support in its docs and historic changelog. (linas.org)

If portability, a more idiomatic C++ API, or an actively promoted multi‑backend framework matters, evaluate higher‑level alternatives (as suggested). SOCI is a commonly used, actively maintained option under the Boost Software License and is worth benchmarking for cross‑DB work. For ODBC portability on Unix, unixODBC is the usual system layer to consider. (github.com)

A short evaluation plan: implement a tiny prototype (connect, prepared statements, a transaction, a bulk insert, and a LOB read/write), run it with your target DB and drivers, measure developer friction (build/link complexity, error handling), verify thread‑safety and Unicode handling, and confirm license compatibility for your deployment. If vendor support is required, factor in consultancy or commercial support rather than expecting that from the project itself.

Recommended Answers

All 3 Replies

License is shown at the bottom of this page

BTW I know nothing about that library.

There are many out there:

Soci, debea, Poco::Data, ODBC(and unixODBC), databaselayer

All these works!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.