When you use referential integrity through the use of foreign keys it places constraints on not only that table but every other table that is connected to it through the use of foreign keys. The easiest way to delete a record is to start with the most distant record/table and work backwards to the record in the main record you wish to delete. In other words, to delete a record from the main table or parent table, we need to delete the related record in all of its children?s child tables first; then delete the child?s related record and finally the parent?s record.
Foreign keys and referential integrity can be a pain but they are definitely a necessity. Otherwise, records will become orphaned in your database. I hope this explanation helps. Please contact me if you need any further help.
Jacque Reed (jacquereed@hotmail.com)