I think by saying "based on database" you are referring to offline routing. In that case a good starting point for your research would be following resource:
sorry for bothering, I am wondering, since i am using a GPS module to get the geographical location (Longitude and Latitude), how can I inject this position on the OSM map, so I cen find the maximum allowed speed limit attribute assigned to that map segment?
If you want to do it on your infrastructure, you can use pgouting (http://pgrouting.org/ for routing) which works with OSM data (http://pgrouting.org/docs/tools/osm2pgrouting.html)