Re: Basic question?What 's the key if there 's no FD(Functional Dependencies)?

From: NENASHI, Tegiri <tnmail42_at_gmail.com>
Date: 8 Nov 2006 13:13:43 -0800
Message-ID: <1163020423.296022.164690_at_e3g2000cwe.googlegroups.com>


Jan Hidders wrote:
> NENASHI, Tegiri wrote:
> > Jan Hidders wrote:
> > >
> > > It is already well known that there is not one correct notion of
> > > updatability but several ones that can all be correct depending on what
> > > you want to do with the view and expect from it. All the other proposal
> > > have easy to understand justifications that explain when and why the
> > > apply. Can you give such an explanation for this defintion without
> > > using category theory?
> >
> > I probably can translate into the language of sets but it is not very
> > interesting, it is like not using algebra but only concrete numbers.
>
> I'm asking you to explain to me to what extent it actually solves the
> problem at hand. If you cannot do that in terms of the problem you do
> not really have a solution.

Let E be a sketch and V another sketch that is a view of E. If the functor Vf:Mon/Mod(E)->Mon/Mod(V) is a left fibration with domain Mon(E) or Mod(E) with keys then every database state in Mon(E) or Mod(E) is delete updatable. If Vf is a right fibration, then every database state in Mon(E)/Mon(D) is insert updatable.

The fibration is a complex notion. To simplify to the intuitive schemata: pullbacks (joins) are updatable, selects without the projection also, co-products only in special cases. It is in the article.

>

...............
> > that is not true at all. Is it that you are saying that the graph is a
> > more poor structure that the relation ?
>
> In some sense, yes, graphs are the relational model restricted to unary
> and binary relations.

It is correct for the graph that expresses a binary relation but some ontological people still try to reduce everything to binary relations. It is funny.

> But things become interesting again if you start
> thinking about operations that do node creation (hello "object
> identity") but this has major consequences for theory about query
> languages, updates languages and views. Can you tell me if this is
> taken into account in the Sketch model?

The sketch is a triple that informally consists of the graph and constraints. Formally, the sketch is a triple (G,D,L), where G is a graph, D diagrams in G, L limits in G. D and G work as constraints in the sketch data model. The sketch is a specification. The sketch graph G is like the ER diagramme but R are converted to E. That is why it is named the EA diagramme, EA => entity-attribute. The sketch can be mapped to a model. The SDM sketch is naturally mapped to the category of finite sets:

The set model maps all the nodes-entities from G to sets, graph edges to operations-arrows in the category of sets. It is known that arrows in the category of sets are functions. The diagrammes and limits are mapped to diagrammes and limits in the category of sets.

If you know that the category can be viewed as a graph with a rule how to compose the arrows, the head to tail, that a new arrow is made and that the objects-nodes of the graph can be anything so far as its arrows can be combined, it is clear that the binary relation problems do not take place. The category is about mapping-arrows composition but the set theory is about collections and members.

For example. The product in the category theory is like the cartesian product in the set theory. The product C of two objects A and B in a category is defined with two arrows: p1 and p2 that are named projections:

A<--p1---C--p2-->B

The product like other constructions in the category theory possesses a universal property that is expressed like all in the category theory by a commutable diagramme:

A<--p1--C--p2-->B

^           ^           ^
|            u           |
f1          |           f2

|-----------D----------|

The diagramme is what defines the product: it says that for any object D and arrows f1:D->a and f2:D->B there is the unique arrow u such that p1o u = f1 and p2 o u = f2. 'o' is arrow composition. The universal property that defines when the view is updatable is much more complex condition but the notion is the same: properties and constraints are expressed by how the arrows-morphisms-functions act, not what the properties of the set are.

Many projection arrows make possible finite products that are like relations with more than 2 arity. Pullbacks that are like constraints on products work like relational joints.

The definition of the product does not use a specific implementation like the Kuratowski pair and applies to other objects than sets so long as the arrows in other categories possess the universal property of the product.

In the sketch model, one can create complex graphs, diagrams and limits that model real life. Of course the SDM is still very young and very primitive if one compares with the realtional model.

>
> -- Jan Hidders
Received on Wed Nov 08 2006 - 22:13:43 CET

Original text of this message