That is relatively simple. There are many useful articles about that.
Probably there are many articles about dropdowns that explain that too.
I am not sure what you are asking. That could be interpreted to mean use of a database for one of at least 2 possibilities.
pre-calculated prayer times
geographic coordinates (longitude and latitude)
If you mean geographic coordinates and have the data then a database would be good. You could even use a XML, JSON or CSV file.
I suggest researching and analyzing what libraries (APIs) exist. You will likely find something that works better than what you could create yourself. If there is something specific you need that none of the existing libraries provide then consider developing something yourself.