I haven't done this but seems you will have to use the APIs your RDIMS provides or may be some webservices to achieve this.Usually the tagging of contents can be done in Teamsite via Metatagger or you can even store the tagging info in Database.if you want to grab this files from RDIMS and then deploy them then you might need to first import them within Teamsite.