check db