Map and Mode as db entities.