How to match the picture string in the database?

I have a local dB ( SQLite ) , where the city( i.e., id and title ). Every city has a coat of arms( i.e. I have pictures in the project ). How do I assign each city a coat of arms?
Android Studio Java.
July 8th 19 at 15:29
2 answers
July 8th 19 at 15:31
Solution
Into the database to store the picture name, as a string. Pulling out, get the id of the resource method
String imageName = getImageNameFromDB // "gerb"
int id = getResources().getIdentifier(imageName, "drawable", getPackageName());
July 8th 19 at 15:33
Can I use base64 to store images in the database. hehehe

Find more questions by tags SQLJavaAndroidSQLite