There are some brief examples of querying the LR database structure at
http://www.earthboundlight.com/phototips/querying-sqlite-lightroom-database.htm You might get some clues from that. I am assuming you already have some king of GUI tool for browsing the SQLite database structure. Most other references I have seen recommend getting the Lightroom SDK and documentation to get a peek inside.