Re: Declaring super types
Date: 25 Apr 2010 19:02:07 GMT
Message-ID: <4bd491af$0$14121$703f8584_at_textnews.kpn.nl>
Tegiri Nenashi wrote:
>On Apr 23, 3:27 pm, r..._at_raampje.lan (Reinier Post) wrote:
[...]
>> I didn't invent this notion of "is a", I have it from
>> a textbook and I believe it is pretty standard.
>
>I still don't follow. First, let's reiterate that we are considering
>the case when both relations have different set of attributes: if
>attribute set is the same, then subtyping is trivially subset
>relation. In a way we are after generalization of subset onto
>arbitrary pair of relations.
Yes. In my textbook, the subtype must have all attributes of the supertype, but it can have more. This is fairly standard.
>Again, I have a problem with Circles and Ellipses. First, if one
>removes the Radius attribute from a circle, then it becomes a Point!
Yes, but you can rename it to axisX, although that isn't a very logical name unless you know you're going to create an Ellipse as a ass, and even then it might as well be called axisY. But this is just a manifestation of a general issue: there is no unique "true" relational model of circles or eLlipses, or of anything else.
>Second, why would I add redundant attributes to a Circle? If the idea
>is to make both relations to have the same set of attributes, then we
>go back to the previous paragraph: I'm interested to see a convincing
>example of two relations with different sets of attributes that fits
>your definition.
Person: first name, last name, date of birth Citizen: first name, last name, date of birth, country of citizenship
I've done some student instructions with that textbook and I still use the same ER modelling technique for myself; I've noticed that this is-a comes up pretty often, and that it is helpful, i.e. many modelling errors I see can be explained in terms of "is-a being overlooked" or "is-a being modeled incorrectly". It is also fairly common in tools.
-- ReinierReceived on Sun Apr 25 2010 - 21:02:07 CEST