| The Database Access Library for C++ |
General Information
Schema issues
ModelGenerator
Selections and Manipulations
Database transformation
Supported platforms
General Information
The Database Access Library
is a C++ Class Library that stores C++ objects in relational
databases. It takes care of all issues related to the
transformation of C++ objects to SQL-relations without
compromising the features of the object-oriented paradigm.
Schema issues
You can make any C++ class persistent by making
it a subclass of the supplied class Instance and adding
three simple methods.
The database access library supports the
following datatypes for persistent attributes: signed/unsigned
int, signed/unsigned long, float, double float, bool and
the supplied fullfeatured classes: String, Timestamp and
Blob.
The database access library supplies classes for
support of associations between classes. These
associations can be indicated as one-to-many relations or
many-to-many relations. They are bidirectional. This
means that if two instances A and B are related you can
find A from B and B from A. The library will make sure
these associations are always consistent. In fact it is
only necessary to set one side of the association the
library will set the other.
One-to-Many associations can be indicated as restricted
or cascading. A restricted association wil make sure that
if you try to remove an instance that is related via this
association to one or more other instances the removal of
the instance is prohibited by the library. If the
association is cascading the associated instances will be
removed with it.
The library supports single inheritence between classes.
In this case a subclass will inherit all attributes and
associations of its superclass.
You can indicate a class as abstract. Such a
class can not have persistent instances.
The library supports a schema versioning
mechanism. Both the whole model as the inidividual
classes have a version that is used to generate and
update schema's in the underlying database.
Each instance is automatically given a database
wide unique identity that will stay unchanged during the
lifetime of the instance.
ModelGenerator
The Database Access Library comes with an
application called the ModelGenerator that can define and
manipulate your class model.
The ModelGenerator can generate C++-header files
that define your class model for the Database Access
Library.
The ModelGenerator is build with the DALC++ itself so it
can use all database that you
have drivers for, supports a multi-user environment has
multilevel undo/redo, etc. The source code is included so
you can see for yourself how easy it is to build such an
application with the Database Access Library.
Selections and Manipulations
You can add, update, associate and remove
instances with one statement.
The library fully supports transactions. All
changes made will be stored in the database when you
specify a commit command or rollbacked on request. When
something goes wrong during the commit, the transaction
will be automatically aborted. When a transaction is
rollbacked all changes made in the transaction will be
undone both in the database and in the client.
You can use C++ as a flexible and easy to use
query language to select instances from the database.
Specified queries will take the inheritance
relations into account. This means that when you select
instances of a superclass, you will also receive
instances of its subclasses.
The library will automatically select associated
instances when you navigate over associations.
The library will manage a client-side cache to
increase performance of navigational style selections.
The library will take care of the memory
management of the persistent instances. It is never
necessary to delete allocated memory for persistent
instances. For this the library makes use of smart
pointers. It is NOT based on a reference count mechanism,
so there are no problems with cycles in associations. The
garbage collection mechanism can also be activated
explicitely.
Persistent Instances will issue events for
changes that have taken place. This makes it possible for
multiple observers to keep track of changes to these
objects.
With one statement you can undo and redo previous transactions
Database transformation
You can switch from one kind of database to the
other with just changing the parameters for one statement.
The driver mechanism makes it possible to
utilize all features of the specific database to optimize
performance. For instance when possible it will make use
of stored procedures.
The library will create tables, indices and
stored procedures when connecting to a database where the
right version of these tables are not available. This
does not exclude the option for DBA's to tune the
database objects.
Through a mechanism of instance versions the
library will track changes made by others. When it detect
a multi-user conflict it will rollback the transaction
automatically and alert the user to the incident.
Instances can be locked explicitely to prevent a
possible rollback when necessary.
The library will make sure that the referential
integrity in the database is not violated.
Supported platforms
Win32 platforms (Windows 95/98/NT/2000).
MS-Access, MS-SQLServer and Oracle 8 or higher.
MS-Visual C++, Borland C++ Builder.