Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

6.2 The DBTools.h++ Solution

In order to insulate your applications from these details, DBTools.h++ uses a data model that normalizes datatypes. Figure 5 shows how this data model works within the DBTools.h++ architecture discussed in Chapter 2:

Figure 5 -- The DBTools.h++ data model

As Figure 5 shows, the DBTools.h++ data model consists of three layers. The database layer resides in the various DBTools.h++ access libraries, and provides an interface to each database manufacturer's API. DBTools.h++ code with any reference to database-dependent datatypes is restricted to this layer. The function of this code is to move data between instances of class RWDBValue and the native database API.

In the internal storage layer, all data is stored in instances of class RWDBValue. Data moving to or from a database is stored here. The internal storage layer spans the DBTools.h++ core and the various access libraries.

The application layer of the model consists of the native C++ types, int, float, and so on, augmented by a small number of classes used for storage and manipulation of structured data: RWCString, RWDecimalPortable, RWDBBlob, RWDBDateTime, and RWDBDuration. The application layer spans the DBTools.h++ core library and your application program.


NOTE: Your DBTools.h++ applications can be written with native C++ types, augmented with a handful of well-defined concrete classes.

All DBTools.h++ classes that interact with a database, such as RWDBSelector, RWDBInserter, and so on, can accept input from, or deliver output to, the native C++ types and concrete classes listed above. Insulation from the datatype and data transport peculiarities of various databases makes DBTools.h++ applications portable and reusable. The remainder of this chapter looks at each of the layers of the data model in more detail.


Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.