| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: more closed-world chatter
"Jon Heggland" <jon.heggland_at_idi.ntnu.no> wrote in message
news:f1ju1j$qni$1_at_orkan.itea.ntnu.no...
> Marshall wrote:
> > On May 5, 8:50 am, Jon Heggland <jon.heggl..._at_idi.ntnu.no> wrote:
> >>> when it comes to the advantage of sub-typing in dealing with
> >>> my question.
> >> I don't know about "advantage"; I just don't see how you can avoid it.
> >
> > It's easy to avoid: just don't put subtying in the language design.
>
> I didn't mean how to avoid subtyping per se; I meant how to avoid it if
> you want to be able to join on attributes with different types.
> --
> Jon
If the language includes casting functions, it should be possible to using them to join on attributes with different types. Consider Marshall's scenario, with the two types, namely int and string. Consider also the function str(i) which takes an int as an argument and returns the corresponding string.
now we can join on attributes i and s by saying something like
"where a.s = str(b.i)"
(Maybe I should have said "conversion functions" instead of "casting functions".) Received on Sun May 06 2007 - 04:57:11 CDT
![]() |
![]() |