added database support
Added support to database