Adding get map function to database