I am trying to write a Firefox 3 add-on which will enable me to easily re-tag bookmarks. For example I have some bookmarks tagged \"development\" and some tagged \"Development\"
As MartinStettner suggested tag structures are based on the foreign key for the tag id so you first have to determine the moz_bookmark.id for the target tag.
This Mozilla PDF explains the relationship in sqllite ...
Tags result in two new entries in moz_bookmarks. The first one is the tag, with parent=4 (tags), and fk=NULL. The second entry follows the first one and has the previous tag as its parent, and fk points to the proper entry in moz_places.
Using that as a guide ... Once you know the id for the tag you can join moz_places.id ON moz_bookmarks.fk ...
SELECT moz_places.id, moz_places.url, moz_places.title, moz_bookmarks.parent
FROM moz_places
LEFT OUTER JOIN moz_bookmarks
ON moz_places.id = moz_bookmarks.fk
WHERE moz_bookmarks.parent = N
Export ...