Deleteing related files?
Suppose I have two tables ...
Table one
dog_id
dog_name
Table two
picture_id
picture_dog_id
Picture_file
Table one is a table of dogs and their names. Table two is a table of extra photos for each dog using the dog_id and picture_dog_id as the relationship between the two.
Is it possible on deletion of a dog from table one to delete the related images or even prevent deletion of the dog if there is matching images?