I have a table called 'pages'. Each page has a content type of either text, video or image. Depending on what the content type is a record is also inserted into either text, video or image table.
When I delete a row from 'pages' how can I ensure the rows from the other table is removed? I understand a little about CASCADE but I am not using foreign keys. At least not explicitly.
My tables look similar to below (I've stripped out fields that are no relevant to the question)
Pages: id, title, content
Video: pid (page id), youtube_url
Any help would be much appreciated.