Boost logo

Boost Users :

From: Nicola Musatti (Nicola.Musatti_at_[hidden])
Date: 2007-03-19 19:07:26


Jeff Garland wrote:
[...]
> Well, I'll be brutally honest -- I don't think I would go that direction. We
> didn't pick a database project last year because a majority of the mentors
> agreed that the 'dsl-based' approach was more of a toy than reality. The main
> reason for this is that in 'real-world' applications queries are often dynamic
> and must be built at run-time. So, before we get ahead of ourselves and think
> about 'sql embedded in C++' we need the basics of getting database access.

I'm answering here, but I read the whole thread. To me what's evident,
from the different libraries available and the positions expressed in
this thread, is that at the highest level there is no single solution
that fits everybody's needs.

On the other hand, no matter what interface you present to your users,
we all need a low level C++ API to the database services. At this level
of abstraction the key elements have been identified and several
libraries share a common design,whose main elements are
connections/databases, statements/queries and result sets. Concrete
examples I'm familiar with are Borland's VCL DB components and SqlApi++,
not to mention SOCI itself. This is where common, previous experience
may be leveraged to implement the design I mentioned above in state of
the art C++.

SOCI or its equivalent may not be the interface you make directly
available to non DB oriented developers, but it is a fundamental
building block for developing more abstract interfaces like those many
of you have in mind, without having to deal directly with the gory
details of calling the db backend through a proprietary C API.

Cheers,
Nicola Musatti


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net