Implement the database moudle and initial test