Database code added

Change-Id: I91181914bee5f7cba6625160325f1f5110675280