allow passing a map database to `register`

fixes #2