Add LoadDatabaseToStringMap utility function

(cherry picked from commit 976464db62381a598b470304cebaf0e490ea5227)