Re: [Shotwell] Extracting image tags from shotwell



On 2016-11-21 09:43, Jens Georg wrote:
Hi,

I'm not that familiar with the DB structure tbh, last time I checked the
tag handling seemed rather counter-intuitive. I'll check and get back to
you.

From what I've gleaned, the database is not normalised.

The tag-photo relation is a many-to-many relation, but the photos and videos tagged are listed directly in a text field in the TagTable. This field can grow to enormous dimensions.

I have a database with 280,000 work related photos with probably an average of 3-4 tags each, organised hierarchically, and the TagTable text field can grow to be about 600kb for some of the top level tags.

I believe this is also one of the reasons why some tag related operations are extremely show on that installation, as a simple removed tag from one photo might require several reads and writes of 600kb blocks.

The 'correct' way would be to have a TagPhotoTable with just the two ids and double indices so joins on either id will be efficient.

I don't if there should be TagPhotoTable and TagVideoTable, each with just two ids, or a shared TagPhotoTable table with the two ids and a type field too indicate whether the tag is for a photo or a video.

The DB queries will be slightly more complicated, but it should be way faster on databases with many tags and photos.

René



Hi,

I have a large set of tags in shotwell and I am trying to export the
tags for each image from the shotwell sqlite database.   Are the tags
for each image stored in some field in the PhotoTable table?

I also see the TagTable, whhere for each tag lists all the thumbnail
filenames.  But I don't know how to find the original image filename
from thumbnails.  In the PhotoTable, there are  thumnail_md5 and
exif_md5, but I don't know if these md5's are relevant or index to
another table or not.

Any help is appreciated.   We spet a lot of time tagging our images in
shotwell and now stuck extracting them.

Thanks
-P
_______________________________________________
shotwell-list mailing list
shotwell-list gnome org
https://mail.gnome.org/mailman/listinfo/shotwell-list


--
René Seindal - rene seindal dk


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]