How to save content created by selected roles in an external database? My Drupal 7 site needs to have articles, faq, pages, blog (not confirmed) and forum. But client can't store any data coming from front end. It can include the registrations from front end. That data need to be stored on external database and admin and users will access that data from the drupal site. 

More specific, if user add comment or topic in forum, it should be saved in external database, and if admin adds a page from admin, it should be saved in local database. Moreover, even registration done from front end, needs to saved in external database

I suggested that we can use complete database externally which can be done easily but suggestion is rejected. Anyone can tell me any solution?

Note: the only solution I can think of is to create a custom module and use hooks for database functionality where I will check which content type is been called (means create, read, update and delete) and depending on that I will switch the database execute the query and return the data. I need to confirm which hooks I need to use.
Yes you can do that.

There are two method for configuring external database.


Inside settings.php
Inside Module directly.


1. Inside settings.php

$databases = array();
$databases['default']['default'] = array(
  // Drupal's default credentials here.
  // This is where the Drupal core will store its data.
);
$databases['my_other_db']['default'] = array(
  // Your secondary database's credentials here.
  // You will be able to explicitly connect to this database from your modules.
);


In your module:

// Use the secondary database we set up earlier
db_set_active('my_other_db');

// Run some queries, process some data
// ...

// Go back to the default database,
db_set_active();


2. Inside Module directly.

If your module will be alone in using the secondary database you can define the connection directly in your module:

  $other_database = array(
      'database' =&gt; 'databasename',
      'username' =&gt; 'username', // assuming this is necessary
      'password' =&gt; 'password', // assuming this is necessary
      'host' =&gt; 'localhost', // assumes localhost
      'driver' =&gt; 'mysql', // replace with your database driver
  );
  // replace 'YourDatabaseKey' with something that's unique to your module
  Database::addConnectionInfo('YourDatabaseKey', 'default', $other_database);
  db_set_active('YourDatabaseKey');

  // execute queries here

  db_set_active(); // without the paramater means set back to the default for the site
  drupal_set_message(t('The queries have been made.'));


Refer https://www.drupal.org/docs/7/creating-custom-modules/howtos/how-to-connect-to-multiple-databases-within-drupal