I got a question, maybe it answered somewhere but I can't find answer. So I got Sqlite db with one table consist, let say of phone models and manufacturers:
Samsung
Apple
Iphone
Apple
Galaxy
Samsung
Ipod
Nexus
so what I trying to achieve is make a script to substitute:
Iphone or Ipod -> Apple
Galaxy or Nexus -> Samsung
I would like to have an data structure like dictionary (I know that example is impossible, but only for illustration) that I can read from file to make an UPDATE query:
{
'Apple':'Iphone','Ipod'
'Samsung':'Galaxy','Nexus'}
so when script find any of values it substitutes it with key
values can be quite an few - let say about 10 so using if/or statements will be unpractical and I don't everytime I need change something go to the code and correct it - so that's why I want to keep my "dictionary" in text file and read it from an script.
I will be appreciated for any ideas that point me in right direction
Thank You.