database works