Begin work with database