Re: A Normalization Question

From: Ralph Becket <rafe_at_cs.mu.oz.au>
Date: 25 Jul 2004 17:00:16 -0700
Message-ID: <3638acfd.0407251600.42546402_at_posting.google.com>


neo55592_at_hotmail.com (Neo) wrote in message news:<4b45d3ad.0407231144.d5c9244_at_posting.google.com>...
> > event name subject verb object
> > ------------------------------------------
> > thingA john takes final
> > thingB john receives 95
> > thingC thingA causes thingB
>
> How would you implement this, taking into account normalization

I wasn't discussing implementation and the table above is normalized in the sense that it contains no logical redundancy (please note the careful use of the word "logical": there is no row or column in the table that can be computed given the other rows or columns.)

> and
> need to handle multiple persons named john?

One way of doing this is for every individual to have a distinct identifier; then we could add a relation mapping individual identifiers to names.

> Would it be similar to
> below and if so, how would one handle the "?"s
>
> T_Thing
> ID Name
> 1 john
> 2 take
> 3 final
> 4 recieve
> 5 95
>
> T_SVO
> Subject Verb Object
> ->john ->take ->final
> ->john ->receive ->95
> ? ->cause ?

In my table I labelled each row (thingA, thingB etc.) so I could refer to any particular relationship, which is how I handled the ?s. But that's just one way of looking at things in a way familiar to database people. In higher order logic I could just write

causes(takes(john, final), receives(john, 95))

where causes is a higher-order predicate taking two propositions as arguments. Equally, taking a quotational approach, I could just write

fact("causes(takes(john, final), receives(john, 95))")

and provide an appropriate interpretation for that particular syntax in the definition of fact.

> Unlike RM, where values of a column can only reference tuples of a
> single relation determined at design time, in XDb2/TM, any thing can
> reference anything in the entire db at run time.

So XDb2/TM cannot admit static type checking. Many of us in the declarative programming community would see that as a serious problem, both practically and logically.

> > > Where/how would one store the following:
> > > ((john take final) cause (john receive 95)) VerbX ObjectY.
> >
> > (I have no idea what VerbX and ObjectY mean here.)
>
> VerbX and ObjectY are variables for anything that act as verb and
> object in T_SVO, for example:
> ((john take final) cause (john receive 95)) cause (john win corvette)

I've already dealt with this one: add two rows

event name subject verb object


thingA        john       takes      final
thingB        john       receives   95
thingC        thingA     causes     thingB
thingD        john       wins       corvette
thingE        thingC     causes     thingD

> > Are you aware of the term "referential transparency"?
>
> No.

A system is referentially transparenct if there is no way of distinguishing between different representations of the same thing. Hence 2 + 2, 4, let x = 2 in x * x, ... are all identical at the logical level in a referentially transparent system. RT is an essential property of mathematics and essentially says that how you choose to represent something shouldn't make any difference to how you can reason about it.

> > Do you really believe that 2 + 2 and let x = 2 in x + x
> > *denote* different things?
>
> My scope is limited to things represented within the context of a db.
> Please show how the above things are represented in a db and identify
> the things to be compared.

A natural representation of the above is `4'.

  • Ralph
Received on Mon Jul 26 2004 - 02:00:16 CEST

Original text of this message