I have to develop some type of application and employ DB inside it.

Let us say i wish to develop it over Home windows presently, however, inside a couple several weeks i might have to migrate it to Linux.

I began reading through a bit about this, but could not reach point i desired.

Can there be or is not a normalOrprotable/standart api for implementing DB ?

I just read there's ODBC,JDBC, iOBDC,unixODBC ? why many of these exist ?

Can someone help clearing and setting my mind straight concerning the problem ?

Edit - I am using C++ - so please advise to that particular direction, despite the fact that i'll appreciate inter-language/inter-platform recommendations

There's a lot of C++ "wrapper" libraries for generic DB access, here's handful of surface of my mind:

  • SOCI - modern C++ syntax, active development, plays nice with boost, supports multiple backends
  • OTL - header-only (templates), very light-weight

These two increased from Oracle-specific work, but support a minimum of other databases now.
Obviously you will never hide vendor variations, but that's general law of leaky abstractions.

Only use the JDBC API in conjunction with a JDBC driver. Don't use the ODBC (bridge) driver.

I suggest you using SQLite in case your DB load is not so heavy. you'll need just one header file and something source file only(amalgamation version). and it is highly portable. I've been utilizing it on Home windows and Linux.