There are some tools listed at http://wiki.openstreetmap.org/wiki/Planet.osm to use OSM data in a database.

Tell us whether you can find a solution or we have to dig deeper …