From: Scott W. <swa...@my...> - 2001-11-05 20:31:09
|
If you do this, then essentially you have 2 completely distinct record structures, one for the "Foo" class and one for the "Bar" class. This means that each record is big enough to hold data for both classes, but only a small subset of these fields are actually used. This would be more of a problem as the number of classes gets bigger. Why wouldn't you make 2 databases? This would really cut down on the wasted space. One db would define the "Foo" class and another the "Bar" class. Then you could figure out some way to view them together....? > > > In this case, it sounds like your original idea will probably be best. I > > can't think of another elegant way to do this. But what if you called > > attribute 1 "[Foo] Attrib1" and attribute 4 "[Bar] Attrib4" would > > attribute 3 be "[Foo,Bar] Attrib3" ? It seems like this might get out of > > hand if there were 5-10 or so classes. > > No. Each individual field must be uniquely named, so "[Foo,Bar] Attrib3" > wouldn't work. You would have two fields, "[Foo] Attrib3" and "[Bar] > Attrib3". Otherwise, how would you sort out the fact that they may have > two different unrelated values? It's just that the names of the fields > happen to be the same. > > -Peff > -- |