DBRE - Developer's manual


/ English / Russian /

Table of contens:

1. Language and compilers
2. Decomposition
3. DB::Db
4. DB::Tr
5. DB::Query
6. How to add support for its database
7. DF::Df
8. PA::Params
9. RE::Replicator
10. RE::Reader
11. RE::Writer
12. MSG::Messager
13. EXC::Exception

Language and compilers

DBRE written in C++, using advanced idioms such as: homomorphic hierarchy, non virtual interface, pimpl, singleton. The program is widely used by shared_ptr and STL containers. All core classes have private constructors to create objects using only the generating functions.
To build DBRE can use any modern compilers support tr1. In unix like systems, we recommend that gcc, for MS Windows - Visual C + + 2008. As a generator makefile'ov used
bakefile

Decomposition


The figure shows the decomposition of the system. Class
DB::Db, DB::Tr, DB::Query, RE::Reader and RE::Writer is a virtual base class. They provide only the interfaces for your entity. Class DB::Db, and DB::Tr addition, encapsulates an implementation of their entity through a pointer to the class DbImpl and TrImpl. After starting the program, set up the PA::Params which reads command line parameters and configuration file. If these operations were successful, an object of class RE::Replicator which is passed a pointer to an object class of PA::Params. Depending on the configuration settings, creating objects (members of RE::Replicator) class DB::Db RE::Reader, RE::Writer and if you need to DF::Df. If you look closely to decomposition, may be the availability of luxury Class DF::Df and implementations DfReader and DfWriter, because the data file could be one of the options for DB::Db. But then it would actually write a file database that would be overly complex and insufficiently rapid solution. For comparison, the recording of DF::Df produced approximately an order of magnitude faster than the record in the database, similar to reading from the data file is also an order of magnitude faster than reading from the DBMS. This is because the specialized and relatively simple binary format is not a relational database system, in contrast to DB::Db which must provide a standard sql interface. Based on the foregoing, we stopped for the present structure of the system as naibolle simple and quick.
More classes of relations can be understood, having considered their interfaces.