Re: Determining Subtype from Supertype



Free wrote:
Free wrote:
Use the classifying attribute, e.g. location_type_cd

The problem with that approach is that I have to be very
careful with the data. For example, one could easily add a
tuple to the department relation that references a
location whose location_type_cd value represents a
municipality.
I could make (location_id, location_type_cd) the primary
key of the location relation and refernce these attributes
in the other relations but then the value of
location_type_cd will be the same in the subtype
relations.
All super/sub type data structures require a classifying
attribute to identify which subtype applies for the instance
of the super type. This is due to the mutual exclusivity of
the sub types. The data structure allows for more than one
subtype to be applicable for a given super type, but I've
yet to find a good business example. So if you don't have a
classifying attribute, you don't have a super/sub type.

Doesn't my example constitute a good business example? I just don't
see how I can have super/sub-types without running into the
aformetioned problems.

.