# Need help calculating shortest paths with data extracted from the database

• May 25th, 2012, 01:46 PM
olfa
Need help calculating shortest paths with data extracted from the database
if any one have an idea that can help me I would be grateful :)
So i should create a web service wich will communicate with my android application .in my android app the client choose two point start and arrival this two point will be send to my web service to find the bus that has the shortest path between them. i have a probleme in web service side
I try to use Dijkstra's algorithm to find the shortest path between two points. to test the Dijkstra algorithm I must extract data from a mysql database and not put it right into my algorithm.but i dont Khnow how can i do it
in my database I have two table that contains the bus route (bus num), code (station id), pt_arret (station name). and another table which contains location code (id station), latitude and longitude, and distance (is the distance between a station and the station which precedes.
(im sorry for the mistacke of spelling because i don't speak english very fluently)
• May 25th, 2012, 02:40 PM
copeg
Re: Need help calculating shortest paths with data extracted from the database
Quote:

to test the Dijkstra algorithm I must extract data from a mysql database and not put it right into my algorithm.but i dont Khnow how can i do it
I don't understand the question (and BTW you've provided no true context to get a descent contextual answer)...you've got the shortest path algorithm and the data, construct the data into a format that the algorithm understands, unless of course I'm reading the statement above correctly in which case you don't want to put your data into the algorithm.
• May 25th, 2012, 06:16 PM
olfa
Re: Need help calculating shortest paths with data extracted from the database
Quote:

Originally Posted by copeg
I don't understand the question (and BTW you've provided no true context to get a descent contextual answer)...you've got the shortest path algorithm and the data, construct the data into a format that the algorithm understands, unless of course I'm reading the statement above correctly in which case you don't want to put your data into the algorithm.

my probleme that i have 1000 node so i cant not put them into my algo. when i try to test dijkstra algorithme i think that i should extract data from my data base .for exemple i dont think that is a good idea to do like that
SVP i need help