Dev optimizing database use for external identifiers