Re: Determining Subtype from Supertype



Ed Prochak wrote:
to solve these types of problems, I find it best to
leave the physical model behind (IDs) and try to define
the problem in a descriptive form. IOW, could you
describe your problem at a data model (logical) level?
(Sometimes just rephrasing the question reveals the
answer.) If location has no data other than ID, then
how would a user ever select it? (Implied in that
question is a hint at the guideline, never reveal
pseudoKey values to the end user.)
Rephrasing: I have an entity called location which can be
one of either a department, municipality or sector. Given
an instance of a location entity, how can I determine
whether it is a department, municipality or sector?

Use the classifying attribute, e.g. location_type_cd
.