I'd suggest you use the vlt tool that comes with CQ, write an exporter
from your database that creates the files according to the files that
would be created for the content with a vlt export, then use vlt import
to move the data into CQ.
Thanks for quick the response, Ruben. I'm hoping to avoid a solution like this, to be honest. The vault file format seems to be pretty undocumented (as is the vault java API), and it feels like there should be a solution that uses the CQ/JCR API - I just can't find anything like that online.
the vault file format is just an xml representation of what's in the
repository and the same as the package format. In fact, if you work on
your projects with eclipse and maven instead of crxdelite to do your
work, you will become quite used to that format throughout your project.
If you do not want to write code to achieve what you are set out to do
If the content to be imported is relatively on the larger side
If your project can spare some dollars.
If you have said yes to all three above, you can look into Kapow Platform which can be used very effectively to migrate content.