How can I store the routes in a database instead of the routing.yml standard file? Should I create a custom route loader?
You could check this previous question. The only answer gives a basic idea how to do it.
Also, there is a bundle called DbRoutingBundle that could help you. I just made a search on KnpBundles to find it so, I did test it or know how it works.
It could be a good starting point to do your own implementation.
Regards,
Matt