how to make a database?
Posted: 31 Mar 2014 12:55
I'd like to save in a variable a destination and also many locations corresponding to this destination and some timestamps corresponding to the locations. And maybe more.
I need somethink like an ini file. There you have a section, key and value. So my section would be a destination, the key would be a location and the timestamp would be a value.
Does somebody know how to make such data bases?
My current solution is not very good.
How I make this currently: (It's hard to understand
)
I make two lists. One has the name "global_gps_locations_"+{destination} (for example "global_gps_locations_home") and the other "global_gps_locations_times_"+{destination}. When I want to get a corresponding time I firstly search for the index of the location key in "global_gps_locations_"+{destination} and then retrieve the key with the same index in "global_gps_locations_times_"+{destination}.
I need somethink like an ini file. There you have a section, key and value. So my section would be a destination, the key would be a location and the timestamp would be a value.
Does somebody know how to make such data bases?
My current solution is not very good.
How I make this currently: (It's hard to understand

I make two lists. One has the name "global_gps_locations_"+{destination} (for example "global_gps_locations_home") and the other "global_gps_locations_times_"+{destination}. When I want to get a corresponding time I firstly search for the index of the location key in "global_gps_locations_"+{destination} and then retrieve the key with the same index in "global_gps_locations_times_"+{destination}.