Added more database connectivity code