> > > So how do i use libmysql to connect to my postres database again? None of 
> > > those are database libraries. They are database-specific client 
> > > libraries. The only C database lib i know that is actively developed i 
> > > libzdb (http://www.tildeslash.com/libzdb/documentation.html).
> > 
> > You don't. As you've said, libmysql is a client library for MySQL server
> > and libpq is it's PostgreSQL equivalent. I guess you're talking about
> > some wrapper library which serves as another abstraction layer built on
> > top of various database libraries, but I believe using this kind of
> > stuff is a very bad idea, because it only introduces more bugs and it's
> > definitely less efficient than using selected database directly, but if
> > you really need this then there's libdbi, libyada, UNIXODBC and others
> > so this shouldn't be a problem.
 
I forgot to comment on this in my previous reply. Using an abstraction layer 
does not decrease efficiency, as they are very thin. Abstraction layers that is 
does impose a performance problem does not live long, unless they add A LOT of 
functionality. libdbi has been unmaintained for quite a while, but was the 
closest thing to MSDAC that we had with wrappers for PHP and many other 
languages. I was a bit unclear here. When i said we need a native database 
library i did not mean one limited to native C/C++ apps. I meant one that is 
written in such a language but established as a standard to other languages.

While such an abstraction layer may introduce bugs they may also
neutralize bugs. For example they can work around problems in the
specific client libraries, and they can also have their own
implementation of common functionality that is shared between databases.
This means code deduplication and therefore decreased chance of bugs.

The most important feature of an abstraction layer is that changing
database is a lot easier and you usually only have to change some
incompatible SQL code. Use an SQL builder and that problem is gone to.
When creating an application that supports many database engines this
means a lot less bugs. And usually applications need to support more
then one database so that makes the "more bugs" argument void for major
applications. Actually dbmail changed to libzdb for this specific
reason.

In Windows client libraries is usually implemented as MSDAC or ODBC
components. This kind of standardization also decreases the probability
of bug. Here is also one of the main reasons to have a OO extention to 
libraries (like COM). Creating bindings for a OO library in PHP, Python, Pearl, 
Java etc usually means writing a lot of code in their respective languages. In 
windows all these languages just use MSDAC trough OLE, there is no native 
support for MSDAC in them, it just work as there are a standard for how to call 
ANY such component. This also removes a lot of duplicate code and loads of 
potential bugs.

                                          
_________________________________________________________________
Klicka här!
http://new.windowslivemobile.msn.com/SE-SE/windows-live-hotmail/default.aspx

-- 
Microsoft has a majority market share
https://bugs.launchpad.net/bugs/1
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to