Check database