image db with keywords? n:n or 1:n relation - Mailing list pgsql-sql

From Janning Vygen
Subject image db with keywords? n:n or 1:n relation
Date
Msg-id 01111609462004.29964@janning
Whole thread Raw
List pgsql-sql
Hi folks,

a friend and me are discussing about the following problem:

if you have a small image database and you want to add descriptions 
to every image like
"Car" "Smoking Man"

Do you reuse the Keyword Car for every image with a car?? (n:n 
relation) or do you have two entries in the description table with 
content "car"??

For me it looks like solution with n:n relation is much more 
complicated, its not natural, but its normalized.

second solution might not be normalized, but its much easier to 
understand and to handle, easier to change a keyword for a given 
image.

thanks for any hints or opinions.
janning


pgsql-sql by date:

Previous
From: frbn@efbs-seafrigo.fr
Date:
Subject: SELECT * FROM t where p or q;
Next
From: Tom Lane
Date:
Subject: Re: Foreign Key Constraint Deletion Order