by Torrie Moore >> Thu, 13 Apr 2000 4:23:20 GMT
In the case you have described I don't think you should use a parent child relationship. It sounds like a player can exist in many chatrooms in which case a many to many relationship is needed?
A parent child relationship is used where an object has no meaning without its parent. For example in a financial system a transaction has a collection of lines. These lines only have meaning when they have a parent ie a transaction. If the transaction is deleted then so should the lines. In your system it sounds like a player has meaning without a chatroom. In this case the relationship would be peer to peer and your code would handle deletion probably in one of the ways suggested by Darrell.
Torrie Moore
torrie@concept-eng.com