title: Best point to start developing a Database Interface in C++?
body: <p>I'm working on some server/client based application at the moment. 
  The application is multi-threaded, has plugin-support (via <code>dlopen</code>,...) and should work with multiple databases.</p>
  
  <p>Now I'm looking for some hints to start the design of the DBI-ABC. First, I thought about a simple Interface like this:</p>
  
  <pre><code>typedef struct {
      unsigned int userid;
      std::string  username;
      std::string  fullname;
      unsigned int usermodes;
  } user_row_t;
  
  class AbstractDBI
  {
  public:
      virtual ~AbstractDBI() {};
  
      virtual bool getUserData(int userid,user_row_t &amp;row) const = 0;
      virtual bool setUserData(user_row_t &amp;row) const = 0;
      // ...
  }
  </code></pre>
  
  <p>This design is enough to handle all statements, used by the application core. But if we need database access in user written plugins, we would have to touch the DBI classes.</p>
  
  <p>As the application will be under heavy load, prepared statements are something essential. Also we want to use database specific data-types, for example <code>inet</code> for postgres.</p>
  
  <p>Has anyone done something like this and could give me some advice?</p>