sqllibThe SQL LibraryThis library provides a lightwind programming interface to SQL databases. We have recognized that it is very easy to write programs using SQL in Perl since the DBD/DBI driver is very easy to use and is able to connect to any SQL database. However, when using C you're lost and need to write your application specifically for one SQL database, losing the possibility to switch the backend database.The benefit of using this library instead of connecting to a given database directly shouldn't need to be pointed out. By using it you would be free to exchange the underlying database without changing all your applications. All you would have to do is to add "SQL=<ab>" to your Makefile and recompile it. <ab> is the abbreviation of the database in question. It is stolen from the DBD/DBI interface:
Pg - PostgreSQL
mSQL - MiniSQL
MySQL - MySQL
Since this interface is very small and easy to handle please find
documentation for all routines in the sql.h header file. It only
covers a small subset of what each specific database provides, but
this way they are exchangable. There is still work to be done. Some queries aren't compatible through the SQL databases since they come with their own additions. For example, mSQL provides "CLIKE" for case-insensitive LIKE statements while PostgreSQL uses the "*~" operator. It would be quite nice if noc_sql_query() would translate the query into the proper SQL slang.
|
|