Are you trying to make a converter from RDBS to RDF as an exercise to improve your skills on Semweb technologies or do you really need this kind of conversion for a real life project? If the latter, then you should not start with simply an RDF API. You should take a look at D2RQ, but also at what the W3C is currently defining. The RDB2RDF working group is working on two specifications, one for directly mapping RDB data to RDF, without further implication of the user (it's called the Direct Mapping) and one for specifying customised mappings, such that you can generate RDF the way you like, according to the RDF Schema you like (it's called R2RML).
At the time I'm writing, these specs are Proposed Recommendation, which is the last step before Recommendation. There are already implementations of both specs.