Added DatabaseManager class to handle database accesses.