![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Criticisms, please (preferably ones based on some formal logic or other). |
|
It is inescapable that every relation is a join (eg., Heath's theorem). So every relvar points to a join. If we can't 'delete' through a join, we can't delete from any relvar (my father, who thought a disk buffer was a polishing material could have concluded this - also, I surmise, we can't logically express some number of otherwise possible relations when we have some purpose besides defining a 'view'). The reason for every relation being a join has nothing to do with the expression that forms a join 'view'. I think it's a consequence of Codd's algebra that every relation that has more than one subset of attributes is a join of two or more relations. By Heath, there will always be two heading subsets (at least one of them having the same heading as the relation) that will determine the other possible pairs of heading subsets in a join. Because the join on all of a relation's attributes with any subset of them is algebraically equal to the relation, it looks to me that the number of possible and irreducible join expressions is at least equal to the number of subsets of attributes in a relation heading. (This is implicit. Explicit constraints may have a number of expressions that are fewer and still sufficient to express all the possible expressions.) For the same reason, every 'insert' is through a join, even if the 'insert' is also to a 'view' formed by union. One can equally say that some relations involve union, but this doesn't change the fact that they are also joins, in other words, not all joins are algebraically equal to some union or other, ie., if a relation is formed by join, it is not always also a union. If so, it should be far more productive to design a language based on axioms that are universal, the theorems that are always true, rather than on statements that are true only sometimes. |
#3
| ||||||||
| ||||||||
|
|
Criticisms, please (preferably ones based on some formal logic or other). It is inescapable that every relation is a join (eg., Heath's theorem). |
|
So every relvar points to a join. If we can't 'delete' through a join, we can't delete from any relvar (my father, who thought a disk buffer was a polishing material could have concluded this - also, I surmise, we can't logically express some number of otherwise possible relations when we have some purpose besides defining a 'view'). |
|
The reason for every relation being a join has nothing to do with the expression that forms a join 'view'. I think it's a consequence of Codd's algebra that every relation that has more than one subset of attributes is a join of two or more relations. |
|
By Heath, there will always be two heading subsets (at least one of them having the same heading as the relation) that will determine the other possible pairs of heading subsets in a join. |
|
Because the join on all of a relation's attributes with any subset of them is algebraically equal to the relation, it looks to me that the number of possible and irreducible join expressions is at least equal to the number of subsets of attributes in a relation heading. (This is implicit. Explicit constraints may have a number of expressions that are fewer and still sufficient to express all the possible expressions.) |
|
For the same reason, every 'insert' is through a join, even if the 'insert' is also to a 'view' formed by union. |
|
One can equally say that some relations involve union, but this doesn't change the fact that they are also joins, in other words, not all joins are algebraically equal to some union or other, ie., if a relation is formed by join, it is not always also a union. |
|
If so, it should be far more productive to design a language based on axioms that are universal, the theorems that are always true, rather than on statements that are true only sometimes. |
#4
| |||
| |||
|
|
paul c wrote: Criticisms, please (preferably ones based on some formal logic or other). It is inescapable that every relation is a join (eg., Heath's theorem). As Brian writes, this is one step too far. Every relation can be decomposed into smaller ones based on its nontrivial functional dependencies, but if it hasn't any - and the resulting relations don't - it is only a join of itself. ... |
|
Perhaps by join you mean something like the AND in Darwen's 'A New Relational Algebra' (thanks for giving its URL earlier), which has the join and and union of relational algebra as special cases. We can also decompose relations by writing them as the unions of other relations (someone I know wrote a PhD thesis about it), but Heath isn't about that. ... |
|
algebra join horizontally (it extends tuples with attributes and values), but when projecting these attributes away again, hasn't added anything). An insert can be expressed as a (relational algebra) union of the existing relation with the inserted tuples, but no nontrivial r.a. union is a r.a. join (and vice versa). Using the term 'join' for Darwen's AND operator, which combines r.a. union and join, doesn't change this. What are you trying to achieve? ... |
#5
| |||
| |||
|
|
rpost wrote: paul c wrote: Criticisms, please (preferably ones based on some formal logic or other). It is inescapable that every relation is a join (eg., Heath's theorem). As Brian writes, this is one step too far. Every relation can be decomposed into smaller ones based on its nontrivial functional dependencies, but if it hasn't any - and the resulting relations don't - it is only a join of itself. ... All relations have at least n+1 fd's, even if trivial, where n is the number of attributes. All relations with at least one attribute (all but 'Dee') are a join of at least two (non-empty) relations. Perhaps by join you mean something like the AND in Darwen's 'A New Relational Algebra' (thanks for giving its URL earlier), which has the join and and union of relational algebra as special cases. We can also decompose relations by writing them as the unions of other relations (someone I know wrote a PhD thesis about it), but Heath isn't about that. ... AND> or the equivalent in another algebra is the only way to understand what join and union really mean, ie., are actually capable of being interpreted as. Some 'unions' can only be expressed as the union of themselves and an empty relation. I think it is helpful to understand union from some formal definition that acknowledges the logical possibility that two relations may not be 'union' compatible, eg., the '<OR>' operation or equivalent. Understanding relation structure based on empty relations seems as pointless/useless to me as understanding relational complement as being 'simple' complement. In fact, I'd rather call simple complement the vague complement and relative complement the exact complement. Why eschew a more precise interpretation when it's staring us in the face? algebra join horizontally (it extends tuples with attributes and values), but when projecting these attributes away again, hasn't added anything). An insert can be expressed as a (relational algebra) union of the existing relation with the inserted tuples, but no nontrivial r.a. union is a r.a. join (and vice versa). Using the term 'join' for Darwen's AND operator, which combines r.a. union and join, doesn't change this. What are you trying to achieve? ... Originally, the most potent axioms for an implementation language that follows McGoveran's suggestions, ie., ones that recognize relation structure as opposed to how a relation value may have been arbitrarily formed. The way most people talk of Codd's algebra is simplistic because they have typically not tried to interpret it, probably have never even read it, for example, in the above, what do horizontal and vertical coordinates have to do with anything relational?. This is faux technocracy, usually involving what de Bono called porridge words which in this case are additional lingo to disguise a lack of basic understand (and which is how I believe Codd's algebra is usually 'taught', or thought to be 'taught'. But more to the point, I continue to be amazed that people claim they can 'insert' a tuple to a relvar but cannot 'delete' that very tuple! (vice-versa too.) I think when they say they can't delete, what they are really saying is that they can't delete a tuple that is not in the join! The same goes for asserting and retracting a proposition in general. I've no doubt that it might be difficult to retract a proposition that one has never asserted! In a way, this is no surprise to me and I still don't know why people think it is a problem, when all human affairs contain much mumbo-jumbo that is logically make-believe. Now that you mention it, another goal would be to prevent geometric interpretations of the basic algebraic structures! Sounds like tables or arrays are getting mixed up with relations. |
#6
| |||||||||||
| |||||||||||
|
|
rpost wrote: paul c wrote: Criticisms, please (preferably ones based on some formal logic or other). It is inescapable that every relation is a join (eg., Heath's theorem). As Brian writes, this is one step too far. Every relation can be decomposed into smaller ones based on its nontrivial functional dependencies, but if it hasn't any - and the resulting relations don't - it is only a join of itself. ... All relations have at least n+1 fd's, even if trivial, where n is the number of attributes. All relations with at least one attribute (all but 'Dee') are a join of at least two (non-empty) relations. |
|
Perhaps by join you mean something like the AND in Darwen's 'A New Relational Algebra' (thanks for giving its URL earlier), which has the join and and union of relational algebra as special cases. We can also decompose relations by writing them as the unions of other relations (someone I know wrote a PhD thesis about it), but Heath isn't about that. ... AND> or the equivalent in another algebra is the only way to understand what join and union really mean, ie., are actually capable of being interpreted as. |
|
Some 'unions' can only be expressed as the union of themselves and an empty relation. |
|
I think it is helpful to understand union from some formal definition that acknowledges the logical possibility that two relations may not be 'union' compatible, eg., the '<OR>' operation or equivalent. |
|
Understanding relation structure based on empty relations seems as pointless/useless to me as understanding relational complement as being 'simple' complement. In fact, I'd rather call simple complement the vague complement and relative complement the exact complement. Why eschew a more precise interpretation when it's staring us in the face? |
|
What are you trying to achieve? ... Originally, the most potent axioms for an implementation language that follows McGoveran's suggestions, ie., ones that recognize relation structure as opposed to how a relation value may have been arbitrarily formed. |
|
The way most people talk of Codd's algebra is simplistic because they have typically not tried to interpret it, probably have never even read it, for example, in the above, what do horizontal and vertical coordinates have to do with anything relational?. |
|
This is faux technocracy, usually involving what de Bono called porridge words which in this case are additional lingo to disguise a lack of basic understand |
|
(and which is how I believe Codd's algebra is usually 'taught', or thought to be 'taught'. But more to the point, I continue to be amazed that people claim they can 'insert' a tuple to a relvar but cannot 'delete' that very tuple! (vice-versa too.) |
|
I think when they say they can't delete, what they are really saying is that they can't delete a tuple that is not in the join! The same goes for asserting and retracting a proposition in general. I've no doubt that it might be difficult to retract a proposition that one has never asserted! In a way, this is no surprise to me and I still don't know why people think it is a problem, |
|
when all human affairs contain much mumbo-jumbo that is logically make-believe. Now that you mention it, another goal would be to prevent geometric interpretations of the basic algebraic structures! Sounds like tables or arrays are getting mixed up with relations. |
#7
| ||||||||
| ||||||||
|
|
Darwen's AND, OR and NOT are more general operations than those of the relational algebra, but they are not any more precise. |
|
And the price he pays for allowing them is worse than computational: the tuples of the relations we create with them can no longer all be regarded as expressing positive facts. |
|
*We now have to know how a resulting relation was produced before we can interpret it. We *lose* preciseness. |
|
Darwen's algebra isn't any more axiomatic, it is *less* precise, .... and *not* implementation oriented, because NOT and OR cannot actually be implemented as they are (try NOT-ing the table {A: 1, B: 1, C: 1}, where A, B, C can take arbitrary floating point values). |
|
I would venture that the first thing any implementer will attempt to do is rewrite all of Darwen's expressions back to relational algebra as far as possible, and throw errors on the remainder. |
|
*Then again, there is no doubt a lot of theory on working with partly disjunctively or negatively interpreted relations that I'm not aware of. |
|
The same objection holds for treating selection as join with mathematical relations (in Darwen's section 'Treating operators as relations'.) A relation in a relational database is of a very different nature than a mathematical relation such as PLUS. *A database relation consists of a posteriori knowledge, information about the world. A mathematical relation is a priori: it reflects information about mathematical constructs, not information about the world. |
|
Nice as an academic exercise (look, ma, I removed a concept) but not as an academic result (no useful purpose). |
#8
| |||
| |||
|
|
R MINUS (for permitted R and Q) Q is also R OR Q. |
|
Eg R add C as A-B means R COMPOSE (PLUS rename ARG1 as C, ARG2 as B, RESULT as A) |
#9
| |||
| |||
|
|
On Jan 8, 11:21 am, rp... (AT) pcwin518 (DOT) campus.tue.nl (rpost) wrote: .... I would venture that the first thing any implementer will attempt to do is rewrite all of Darwen's expressions back to relational algebra as far as possible, and throw errors on the remainder. You use "venture", "attempt" and "as far as possible" but the semantics are clear. ... |
#10
| ||||||||||||||||||
| ||||||||||||||||||
|
|
Reinier, There are fundamentals of Date& Darwen's "algebra" A that you don't understand. |
|
Definitions: AND is JOIN. NOT R has exactly the tuples typed by R that are not in R. |
|
R OR Q has exactly those tuples typed by R JOIN Q which give a tuple from R when projected on R's attributes or give a tuple from Q when projected on Q's attributes. |
|
Darwen's AND, OR and NOT are more general operations than those of the relational algebra, but they are not any more precise. Agree. And the price he pays for allowing them is worse than computational: the tuples of the relations we create with them can no longer all be regarded as expressing positive facts. Not so. Queries are interpreted exactly the same as always. Tuples that are present are true and those that are not present are false. |
|
We *lose* preciseness. Not so. |
|
Darwen's algebra is[...] *not* implementation oriented, because NOT and OR cannot actually be implemented as they are (try NOT-ing the table {A: 1, B: 1, C: 1}, where A, B, C can take arbitrary floating point values). Of course they can be implemented. It's true that they denote large relations, but that's not necessarily a problem. |
|
First, you could allow only queries in NOT and OR that can be recast using MINUS and UNION. Second, you could allow non-query expressions but not queries in NOT and OR. |
|
Third, the cost of a query in NOT or OR is not necessarily unacceptable. It depends on the size of the attribute types rather than the number of tuples in the relation, |
|
but you could allow them and and still compute them (eg if the result is small enough) (or in a lazy evaluation context). |
|
The benefit is that NOT and OR can give clearer queries even if you limit yourself to recastable queries (they roughly mean "not" and "or" in the sense that roughly JOIN means "and", MINUS means (limited) "and not" and UNION means (limited) "or"). |
|
I would venture that the first thing any implementer will attempt to do is rewrite all of Darwen's expressions back to relational algebra as far as possible, and throw errors on the remainder. You use "venture", "attempt" and "as far as possible" but the semantics are clear. |
|
You can either think of PLUS as a named relation value or as a variable that doesn't happen to change. Otherwise everything is as usual. |
|
In your informal terms, PLUS is information about the world; that info just doesn't happen to change. |
|
Nice as an academic exercise (look, ma, I removed a concept) but not as an academic result (no useful purpose). It is practical and not an exercise to simplify and generalize. The basic consequence is that the difference between operators and relations becomes only syntactic. |
|
You can use a relation wherever you can use an operator and vice versa. This can be extended to include user-defined operations for which, again, the complexity for recastable queries is the same as the recast query, and you need a policy for non-recastable queries (and further policies for side-effects). If the D&D presentation were more formal and complete this would be more evident. |
|
BTW, using NOT and OR is equivalent to using MINUS and UNION along with a named single-attribute relation value for each type each containing all that type's values. |
|
Such a database has the same operation complexity as usual but some of the leaves (the type-relations) are big. So the cost of evaluating corresponding queries is the same. Again, it is notationally more elegant and exactly as computationally expensive to allow the latter with the same recast-restrictions you would apply to the former. |
|
philip |
![]() |
| Thread Tools | |
| Display Modes | |
| |