Put the db name extract logic into implementation.