On Jan 29, 2008, at 10:49 AM, MZ_TRICSTA wrote:
One last question, guys. What if there is overlapping between the childtables, so that one instance has more than one "Type"?
Then you might want to model this as an Entity-Role relationship which allows multiple rows in associated tables for the same row in the primary table.
If this is the case, then you can't use a single-valued discriminator. You could use a bit field represented as a number in which each bit corresponds to an associated Role with data in another table.
Craig
Craig L Russell wrote:This is a very common pattern in object-relational mapping. The columnthat contains the type of crane is commonly referred to as a discriminator column, and is commonly a CHAR, VARCHAR, or NUMERIC type. The value of the discriminator column that identifies which table to look for is referred to as a discriminator value.The alternative is to include all possible tables in a query, which isperformance-limiting. Craig RussellArchitect, Sun Java Enterprise System http://java.sun.com/products/ jdo408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp!-- View this message in context: http://www.nabble.com/Determine-which-child-table-a-record-belongs-to-tp15164998p15166419.html Sent from the Apache Derby Users mailing list archive at Nabble.com.
Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp!
smime.p7s
Description: S/MIME cryptographic signature