Add common support for database configuration

Fixes bug 1096537

Change-Id: I9b7dbc08ae709af81ca968857f7028c150d2c7e5