The photos didn’t have keywords stored in their EXIF data and I spent many days without luck trying to find a tool which could import from CSV or similar into the files so I could use that functionality.
I have started manually entering the keywords/tags against the photos using the Gallery interface, but this could take me tens of hours to complete, hence my request for information to make this job easier. If I knew where in the database the tag data was stored I could use a SQL script to import the data from a CSV.