Debea Features

  • Full serialization of C++ objects using different databases (SQL, CSV, XML files)

Debea can map, load and store objects as database relations. That's main purpose of this library. You can also use it to send simple SQL queries to variety of databases that can be accessed through ODBC or iODBC.

  • Automatic INSERT or UPDATE SQL statement generation based on object state.

Storable objects have information about its database state. When new object is created, it is marked as Storeable::NEW and first serialization will generate SQL INSERT statement for that object. Subsequent updates will automatically generate SQL UPDATE statements.

  • Support for relation types 1-n, 1-1

Debea supports storing composited storeable objects. If you have object that contains list of objects and all of them have STORE_TABLE defined you can store and load them all in single program call.

Debea knows how to traverse on std::list, std::set and other standard containers, but of course you can define CollectionFilter for your own containers too.

  • Create conversions for user defined types

Every object member and binded variable can be stored in multiple ways. Conversion between member/variable and database record field can be fully controlled by user code.

  • Support for multiple inheritance from dba::Storeable

You can add dba::Storeable as parent to existing object, define STORE_TABLE for it and store it in database with no additional effort.

  • Support for storing C++ object in SQL tables with different names

You can open stream for mapped objects using custom relation name. This way you can map one object to multiple relations as long as they have identical schema.

  • Flexible database transaction handling

You can enclose multiple database operations in one Transaction context simply by creating dba::Transaction object and getting streams from it. As long as this object exists all operations will be done in single transaction.

Transaction object can be nested. This means that if you surround two instances of dba::Transaction with another transaction object you will merge those two transactions in one.

  • Support for binding custom variables to read and write object streams

You can bind custom variables to object stream. This way you can reconstruct object references using values fetched from foreign keys.

  • Loading C++ objects from SQL queries

You can define your own SQL query and fill list of mapped objects using that query.

  • Plugin Architecture

Library is using plug-in architecture for various SQL RDBMS support and provides one, simple interface for query processing and object serialization.