Posted by Michael Fesser on 03/01/06 16:50
..oO(Ja NE)
>I would like to see how many pictures have "lost" their albums - I have
>table "album" with some id, I have table "photo" with pict's id and
>album's id so I can know where the picture belong, but sometimes some
>users delete their album form database without moving pictures to
>different (existing) album.
With FOREIGN KEY constraints such inconsistencies could be prevented.
The database could reject any DELETE attempt as long as the album is not
empty. Or it could silently delete the images as well.
Micha
Navigation:
[Reply to this message]
|