How to use own map database to display map on a website and use that map to find route and do other stuff ?
You have two options in order to calculate routes depending on your database. If your database has clean and accurate address names then you can easily use the google maps API that can be found here: https://developers.google.com/maps/documentation/directions/. Bare in mind that you can only execute 2500 requests per day with the free version.
On the other hand if you have a network defined on your db (have the roads in a nodes and arcs manner) then you can implement Dijsktra's algorithm.
Have a look here: http://www.vogella.com/articles/JavaAlgorithmsDijkstra/article.html Because of the fact that the network should be loaded from the database in order to calculate the best route I suggest the singleton pattern.