[KPhotoAlbum] image search question

josephj at main.nc.us josephj at main.nc.us
Mon Apr 23 08:58:58 BST 2012


Big picture - maybe a rant ;)  ...

As I said earlier, I'm not super at databases, but one of the most
fundamental concepts I did learn was normalization.  Aside from being very
nice and tidy mathematically, the main point of using it was to avoid all
sorts of problems like this.

If you're going to use tag subcategories, they should be strict.  I.e. if
pool is under hotel a, that's the only place it should be because being a
subcategory implies that it is just that, a subcategory of the
supercategory.  If it's not a true subset, then it should just be a
keyword or attribute that can be applied to any object.

The same goes for people.  If a person fits in more than one subcategory,
then those subcategories should probably be keywords, not subcategories.

If you don't do that, you run into anomalies such as those Martin points
out where there probably isn't a right answer. In a case like that,
"fixing" the code to accommodate a particular case is likely to cause more
problems than it solves.

I use subcategories a bit.  I have animals with a subcategory of deer with
a subcategory of faun.  This works because the subcategories are true
subsets.

Adjusting all your tags to fit a new tagging scheme is not something to be
undertaken lightly, especially for large collections, but in the long run,
if you design your categories and tags the same way you'd design a
relational database, you'll save yourself a lot of grief.

Just switching from subcategories to keywords will help, but if you have
dependencies within your keywords, you can probably get into just as much
trouble.

Of course, the nature of the objects (photos and videos) that you collect
may change over time in unanticipated ways.  This may make a design that
was quite reasonable to start with fail in the future (just like
everything else with systems that grow and change).

The only way I can think of to handle that is to use a regular database
for all the categories and keywords so that they can be accessed directly
from an external program using something like SQL which is powerful enough
to rearrange everything without having to retag it all from scratch.

(If I did need to do that, I'd be out of luck because I don't actually
know SQL.  I just understand what it can do.)

Joe

> Hello,
>
> from my experience, KPA doesn't distinguish between the same string in
> different sub-categories. If the string is the same, they are treated as
> identical in the search.
>
> Based on what you intend, this might be a bug or a feature.
> In your case it looks like a bug. The correction would be - as already
> suggested - to add a tag "Pool", independent from the hotels and then
> search for "Hotel A & Pool" or "Hotel B & Pool". This will also work for
> "Hotel C and Pool" later on.
>
> It becomes a feature, if you have things like this:
> I have my "Persons" ordered into subcategories, from where I know them.
> E.g. friends, amnesty international, colleagues, organized bicycle
> tours, ...
> Now there are persons who belong in two of these categories. If I search
> for them, I will find them, no matter for what subcategory I tagged
> their name. (So it is a feature here !)
>
> If I would like to only find the fotos of person x, but only the ones
> taken in context "amnesty international", I would need to search for
> "Person A & amnesty international". (Unfortunately, this seems to give
> wrong results, when I just tried - but I don't have the time to look
> closer at this right now...)
>
> Regards
>
> Martin
>
>
> Am 22.04.2012 22:01, schrieb Markus Grabner:
>>
>> 	Hi all!
>>
>>     I have a question regarding the use of the image search function. I
>> tagged
>> a bunch of images, including those from the stays at two different
>> hotels, say
>> "hotel A" and "hotel B". Both of them had a pool, so I added "pool" as a
>> subcategory of both. Now if I want to see all photos taken at a hotel
>> pool, I
>> simply search for "pool" and get all pool photos from hotel A and hotel
>> B. But
>> when I search for the tag "hotel A" (to see all photos taken at hotel
>> A), I
>> get all photos taken at hotel A *and* all photos taken at the pool of
>> hotel B.
>> I think this is because "pool" is a subcategory of "hotel A" and
>> therefore
>> automatically included in the query, but then also matches images which
>> don't
>> have the "hotel A" tag. This behaviour seems to be a bug to me, but
>> maybe I
>> misunderstood how image queries should be formulated, so could somebody
>> please
>> explain how (in the above example) I should write a query to
>> *) search for all photos from hotel A,
>> *) search for all photos from the pool of hotel A,
>> or should I tag the images differently to perform such queries?
>>
>> 	Thanks & kind regards,
>> 		Markus
>
>
>
> _______________________________________________
> KPhotoAlbum mailing list
> KPhotoAlbum at mail.kdab.com
> https://mail.kdab.com/mailman/listinfo/kphotoalbum
>





More information about the Kphotoalbum mailing list