added Database class as a standalone file.