Sanitize database key