Testing Database Functionality