I've been reading up on foreign key constraints and it sounds like just what i need - however, it raises a question that i haven't found an answer for :
in your earlier post you said that using constraints means that i can cascade the delete across all four tables with the photographer as the root - this is excellent, but does it become obligatory that all data is deleted if i delete a photographer ?
the problem is that a production (the second table) can have 1 or more photographers associated with it - so I'll be checking if the photographer i want to delete shares any productions with other photographers. If this is the case then I only want to delete the photographer data but not the productions/images/sales (as they are still linked to other photographers)
having just written that, I think i may use the constraints only from the productions level down through the images and sales. that way I can get a list of the productions for the photographer and check which ones are shared and deal with the deletes accordingly.
but still, i'd be interested to know the answer to my question