Question : Bilateral Referential Integrity

Say I have a table of products sold at a superstore that carries everything from soup to lawnmower nuts, and a sub table for each category of product sold.
The main table has all of the attributes that are common to all products; eg.,name, supplier, UPC, price, inventory, reorder point, etc.
The sub tables have the attributes that are unique to that category of product; eg. the FreshFood sub table might have a BestBeforeDate attribute; the SportingGoods sub table might have a Season attribute. There is a 1-1 relationship between the main table and each sub table.

How can I establish referential integrity between the main table and the sub tables so that you can't delete a record in the main table if there is a related record in one of the sub tables, and vise versa?

Answer : Bilateral Referential Integrity

Check this:

  response.write "key: " & objRow.getAttribute("primary-key") & "  ----  " & objRow.text & "<br>"
Random Solutions  
 
programming4us programming4us