in reply to Cascade deletion
I should have also mentioned that I want to write this code to be platform independent. I'm looking into using CASCADE options in SQL queries, but I'd like to be able to use this with ODBC, for example, which supports a limited set of SQL functions. Also, using related tables could lead to a massive number of tables, which would slow things down quite a bit on queries.