database handler setup