Database Programming in C

I want to program various databases in C. I want to know if all the major database providers Oracle, DB2, Sql Server, MySql api to use for C. If they all do, you can give me some links to which is, but more specifically how to work with the api?

thanks

+1


a source to share


2 answers


The standard standard for connecting to a database is ODBC, which is a C API. This Wikipedia link contains an overview and many links to other resources.



+6


a source


You can use ODBC. But this is not a good idea, the reason for the performance impact it can have on your application.

The answer to your question is yes. All major databases provide some api for you so that you can communicate directly with your database.



The only problem with your question is that you forgot to specify which operating system you will be developing on. The only api I can remember right now for majors databases is libpq (for PostgreSQL). Usually on the developer's website one can find apis for languages ​​like C and C ++.

0


a source







All Articles