Database handling implemented