[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [digikam] [Bug 355831] MySQL Schema Improvements
From: Richard Mortimer via KDE Bugzilla <bugzilla_noreply () kde ! org>
Date: 2016-04-21 19:24:47
Message-ID: bug-355831-17878-bH4HC01eUz () http ! bugs ! kde ! org/
[Download RAW message or body]
https://bugs.kde.org/show_bug.cgi?id=355831
--- Comment #66 from Richard Mortimer <richm+kde@oldelvet.org.uk> ---
(In reply to swatilodha27 from comment #63)
> Hello Richard.
>
> I'm Swati, currently working on digiKam MySQL database support project. I
> read this open bug for MySQL Schema improvements and thought of a plausible
> solution to handle the tags (rename, move or delete)
>
> An image can have many tags and a tag can belong to multiple image. So to
> handle this many-many relationship between the two, we could take use of the
> following tables:
>
> Table: Image
> Columns: Image_ID, Image_Title
>
> Table: Tag
> Columns: Tag_ID, Tag_Title
>
> Table: Image_Tag
> Columns: Tag_ID, Image_ID
>
> Setting the Image_ID and Tag_ID as foreign keys would help in linking the
> tables.
>
Foreign keys have already been added here.
CONSTRAINT ImageTags_Images FOREIGN KEY (imageid) REFERENCES Images (id) ON
DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT ImageTags_Tags FOREIGN KEY (tagid)
REFERENCES Tags (id) ON DELETE CASCADE ON UPDATE CASCADE,
Without seeing a specific error I cannot tell what the problem may be with
rename, move or delete.
--
You are receiving this mail because:
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic