save map to db