Boost logo

Boost :

From: Corwin Joy (cjoy_at_[hidden])
Date: 2001-06-02 16:45:18


----- Original Message -----
From: <jeff_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Saturday, June 02, 2001 3:49 PM
Subject: RE: [boost] Interest in Database Template Library?

> Having used DBTools pretty extensively and having only skimmed the DTL
docs here
> are the differences I see:

Thanks for the summary below - we don't actually own a copy of DBTools.h++ -
so our comparisons have largely been based on their online marketing
material.
>
> 1) DBTools provides a complete mapping solution with vendor specific
drivers
> for Oracle, Sybase & others (or ODBC if so desired) while DTL requires an
ODBC
> interface.

True. Eventually we hope to have an internal API to hook in vendor specific
drivers
but right now we require ODBC.

> 2) DTL is focused on integrating with the standard library, DBTools was
> written pre-standard and mostly integrates with the DBTools library. Of
course,
> the C++ standard library does not have an analog for things like RWDate
which
> can be mapped to a database column.

True again. We wrote a custom date class to map date columns (and we
added a date math library to go with it since this was a common request).
Users can also use the built in ODBC date struct {year, month, day, ...etc.}
if they don't like our class.

> 3) DBTools provides support for asynchronous queries and multithreading,
not
> sure about how DTL handles these issues....

We have not done too much in the direction of multithreading yet. ODBC
provides support for asynchronous queries and our Input/Ouput iterators are
likely not far away from being thread safe, the containers would be harder,
however. Here is a link with some more details:
http://groups.yahoo.com/group/DatabaseTemplateLibrary/message/24

> 4) The DBTools equivalent of the DTL DBView functionality is provided in
> DBTools by RWDBMultiRow, RWDBSchema, and RWDBOSql. The DBTools iterators
are
> obviously not STL based, but are similar. The concepts of binding a local
> variable to placeholder in an SQL command are also provided in both
libraries.
> 5) The total DBTools library is at least 50 classes which has been
around for
> years, DTL is a handful of classes and is relatively new.
>
> So my conclusion is that DTL could use some of the capabilities of DBTools
and
> vice versa. Both approaches remove much low-level database programming
and
> increase code portability.
>
> On question, how does DTL handle NULL values?

Two ways,
1. We have a NullField class that can be sent to a variant field to indicate
a NULL value, or
2. You can set flags when validating a row before it is written to the
database to indicate that some fields are null.

Here is the doc: http://www.geocities.com/corwinjoy/dtl/ProcessingNulls.htm

Thanks again for the comments.

Corwin


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk