Re: Logical equivalence of simple and complex types under the relational model?

From: Dawn M. Wolthuis <dwolt_at_tincat-group.comREMOVE>
Date: Thu, 2 Dec 2004 21:12:04 -0600
Message-ID: <coolie$5jk$1_at_news.netins.net>


"Rene de Visser" <Rene_de_Visser_at_hotmail.de> wrote in message news:cohfcu$t87$1_at_news.sap-ag.de...
> "Dawn M. Wolthuis" <dwolt_at_tincat-group.comREMOVE> wrote in message
> news:cog95u$4em$1_at_news.netins.net...
> > "Rene de Visser" <Rene_de_Visser_at_hotmail.de> wrote in message
> > news:cofms4$vr$1_at_news.sap-ag.de...
> > > I have read a number of papers that discuss whether complex data types
> > > should be allowed under the relational model.
> > >
> > > What I haven't seen analysed is whether there is actually any logical
> > > difference (upto renaming/isomorphism) between the resulting models.
> > >
> > > It seems to me at first sight that
> > >
> > > 1) RM with simple types
> > > 2) RM with complex types
> > >
> > > are indistiguishable at the logical level.
> > <snip>
> > > If this is so why was there in the past debate about whether to allow
> > > complex types or not, when it seems in theory (and in at least some
> > > languages) it makes no logical difference?
> >
> > All data can be accounted for either way, but there is typically not a
> > mapping between metadata. So, even if there is no logical difference,
> there
> > is a semantic difference that is significant.
> >
> What is describe above is a metadata mapping, it effectively maps between
> two logical models. i.e. I am saying that the two logical models are
> equivalent up to 'Isomorphism', though I think in this case it is more
> normal to say 'semantic mapping'? As demonstrated above it is even
possible
> to create a model3 that consistently includes model1 and model2.

>

> i.e. what I am asserting is that there is always a meta data mapping. And
> that although there is a semantic difference it is effectively one of
> renaming.

>
> Or do you have a specific counter example?

I'm not sure I'm exactly tuned into your question, but if I "get it" then here are some thoughts:

Yes, one can take the same data and put it into one model or another and switch between them -- that is, you can take the same business problem and implement a solution with only simple types (in base tables) and another solution with complex types. However, you cannot do that with the exact same stored data and exact same metadata. If you want to discount metadata changes as semantic mappings and are fine with one model having "Date" while the other has "Month" "Day" and "Year" without any "Date" metadata or types, then I'll put that aside in favor of another example.

Example: Complex Type is an ordered list of favorite colors, ordered from most favorite on down
If you then take the data from the complex type and map it to simple types, one value per row, you end up with an unordered list. You would have to add in a Ordering attribute in order to be able to retrieve the same information from both. In this case, the type itself (which is metadata) includes more than simply semantic changes since information is lost when the values of the complex type are split out without adding any new stored data.

What I don't know, however, is whether this is relevant to your question, so please let me know that. Thanks. --dawn Received on Fri Dec 03 2004 - 04:12:04 CET

Original text of this message