Is there a way to use OSRM with PostGIS (Windows)?
Related: Why mobile routing is so fast?
OSRM does not use a database, but tuned data structure that are sometimes (falsely) called index. The process to go from raw OSM data to actual query processing is a multi-step process, i.e. extract, prepare, route. As Mapperz said, it is possible to query a SQL data base for additional data during the extraction process.
To query OSRM for routes from your SQL queries, you would need to connect via http to a running OSRM instance and parse the data.