Path: news.cambrium.nl!textnews.cambrium.nl!feeder3.cambriumusenet.nl!feed.tweaknews.nl!postnews.google.com!a17g2000pre.googlegroups.com!not-for-mail
From: Tegiri Nenashi <tegirinenashi@gmail.com>
Newsgroups: comp.databases.theory
Subject: Re: no names allowed, we serve types only
Date: Wed, 17 Feb 2010 10:51:14 -0800 (PST)
Organization: http://groups.google.com
Lines: 69
Message-ID: <2680fc20-5aad-4325-a770-c6127cfd9e3d@a17g2000pre.googlegroups.com>
References: <f272eb14-2de5-4358-af07-ebed74054a72@o30g2000yqb.googlegroups.com> 
 <f5af0e07-42e5-4ed7-9d8e-8bea1e483a8f@u19g2000prh.googlegroups.com> 
 <a2b1b4c5-79f2-445a-98a5-3f979aec8884@q21g2000yqm.googlegroups.com> 
 <79770923-7407-4a2f-bae9-adedc37f6aa7@a16g2000pre.googlegroups.com>
NNTP-Posting-Host: 70.137.135.62
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1266432674 4173 127.0.0.1 (17 Feb 2010 18:51:14 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 17 Feb 2010 18:51:14 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: a17g2000pre.googlegroups.com; posting-host=70.137.135.62; 
 posting-account=PBsn8woAAADaWofLEAjNrE17YVrUmBlm
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.7) 
 Gecko/20091221 Firefox/3.5.7,gzip(gfe),gzip(gfe)
Xref:  news.cambrium.nl

On Feb 17, 10:14=A0am, David BL <davi...@iinet.net.au> wrote:
> On Feb 17, 9:15 pm, Nilone <rea...@gmail.com> wrote:
>
> > On Feb 17, 1:29 pm, David BL <davi...@iinet.net.au> wrote:
>
> > > Operators can be formalised without a type system too. =A0Simply
> > > formalise an operator as a function defined on some domain, where a
> > > domain is merely a set (not a "type").
>
> > Thanks for the introduction, I haven't seen the typeless model
> > before. =A0I don't see how such a system would handle arithmetic
> > operators (e.g. + and <) and string operators like concatenation and
> > search - could you perhaps give an example?
>
> In a typeless system a unary function could for example be formalised
> as a triple (D,C,G) where D is the domain, C is the co-domain and G is
> the graph of the function (a subset of DxC). =A0This is typeless in the
> sense that a function value doesn't formally have any concept of a
> defined type. =A0Rather the domain and co-domain are formally part of
> the function's value as a triple (D,C,G). =A0For example two functions
> can have the same domain and graph but different co-domains. =A0That
> makes them distinct. =A0This is actually conventional, as when one
> determines whether a given function is surjective (i.e. its range
> equals its co-domain). =A0It wouldn't make sense to ask whether a
> function is surjective if its co-domain isn't part of its value.
>
> Alternatively a typeless system could instead formalise a unary
> function as a set of pairs (i.e. what we above called its graph). =A0In
> that case the domain and range is determined from the graph using
> projection, but there is no concept of a co-domain.
>
> Similarly a typeless system could formalise a relation in two
> different ways. =A0One allows for attributes to have domains specified
> independently of the graph (or "body") of the relation, and these
> domains represent part of the relation's value. =A0That means that two
> distinct relations can have exactly the same graph.
>
> Alternatively a relation can be identified with its graph. =A0In that
> case the domains are determined as the projection of each attribute.
>
> In a typeless formalism one is very clear about what it means for two
> functions or two relations to be equal. =A0 It seems to require more
> effort to understand what equality means in a typed formalism.
>
> In a D&D type system, a value has a MST, but this actually depends on
> the prevailing type system. =A0E.g. two different databases could use
> different type systems. =A0Putting it another way, the MST of a value
> depends on who you ask :-).
>
> D&D want to ensure that equality of values is independent of declared
> types. =A0That's why they say that a selector for an ellipse value that
> happens to specify equal width and height actually returns a value
> which has an MST of circle. =A0It's like a "magic downcast". =A0They poin=
t
> out that OO systems don't normally work that way. =A0E.g. an OO
> constructor for ellipse never returns a circle.
>
> I think D&D end up treating relations with the same body and attribute
> names as equal. =A0i.e. in essence the declared attribute domains are
> not part of the relation's value. =A0I think they define subtyping of
> relation types accordingly.
>
> It seems to me that D&D spend a lot of effort discussing ideas that
> are either eliminated or trivialised in a typeless formalism of the
> RM.

Formalization is less of an issue here. I interpret the question as
how to make a working system operating predicates such as Plus(x,y,z)
and Concat(x,y,z). Logical programming provides sort of an answer.
