Test of db function