![]() | |
#11
| |||
| |||
|
|
Yes, I mean assignment to a (programming) variable. I don't know of any logical operator called 'assignment'. |
#12
| |||
| |||
|
|
On Oct 30, 11:41 am, paul c <toledobythe... (AT) oohay (DOT) ac> wrote: Yes, I mean assignment to a (programming) variable. I don't know of any logical operator called 'assignment'. You don't seem understand assignment. Assignment has nothing to do with the relationship between relations and logic or the relational model per se. The semantics of assignment in a dbms language is exactly the same as it is in every programming language. You evaluate expressions using the current values of variables. You can assign the value of an expression to a variable. This gives a new overall state. The relationship between the values of one or more variables in the post-(multiple-)assignment state and the expressions that were used to express those values in the pre-assignment state is simply (and tautologically) that the values of the assigned expressions evaluated using the pre-assignment variable values are the same as the values of the expressions consisting of just the variable names evaluated using the post-assignment variable values (ie the post-assignment values of the variables). It doesn't matter what the types of variables are. If a language allows assignment to an expression then the language designer has to say what that means. Presumably the post-assignment values of the variables in the assigned-to expressions must be such that when they are evaluated in the post-assignment state then their values are the same as the values of the assigned- from expressions evaluated in the pre-assignment state. If the language processor cannot determine a single choice for the post-assignment values of variables then the language designer has to give some sort of policy. But again, the particular assigned-from expressions have no other relationship with the new state than that when evaluated in the old state they give the values of the variables in the new state. The particular assigned-from expressions don't matter, just their values. philip |
#13
| |||
| |||
|
|
compdb (AT) hotmail (DOT) com wrote: On Oct 30, 11:41 am, paul c <toledobythe... (AT) oohay (DOT) ac> wrote: Yes, I mean assignment to a (programming) variable. I don't know of any logical operator called 'assignment'. You don't seem understand assignment. Assignment has nothing to do with the relationship between relations and logic or the relational model per se. The semantics of assignment in a dbms language is exactly the same as it is in every programming language. You evaluate expressions using the current values of variables. You can assign the value of an expression to a variable. This gives a new overall state. The relationship between the values of one or more variables in the post-(multiple-)assignment state and the expressions that were used to express those values in the pre-assignment state is simply (and tautologically) that the values of the assigned expressions evaluated using the pre-assignment variable values are the same as the values of the expressions consisting of just the variable names evaluated using the post-assignment variable values (ie the post-assignment values of the variables). It doesn't matter what the types of variables are. If a language allows assignment to an expression then the language designer has to say what that means. Presumably the post-assignment values of the variables in the assigned-to expressions must be such that when they are evaluated in the post-assignment state then their values are the same as the values of the assigned- from expressions evaluated in the pre-assignment state. If the language processor cannot determine a single choice for the post-assignment values of variables then the language designer has to give some sort of policy. But again, the particular assigned-from expressions have no other relationship with the new state than that when evaluated in the old state they give the values of the variables in the new state. The particular assigned-from expressions don't matter, just their values. philip That's adding more notions, such as 'state' and 'before' and 'after', 'assignment to an expression' et al, all artifacts of certain physical programming attitudes if you ask me. I'm more interested in subtracting notions as far as possible. |
#14
| |||
| |||
|
|
compdb (AT) hotmail (DOT) com wrote: On Oct 30, 11:41 am, paul c <toledobythe... (AT) oohay (DOT) ac> wrote: Yes, I mean assignment to a (programming) variable. I don't know of any logical operator called 'assignment'. You don't seem understand assignment. Assignment has nothing to do with the relationship between relations and logic or the relational model per se. The semantics of assignment in a dbms language is exactly the same as it is in every programming language. You evaluate expressions using the current values of variables. You can assign the value of an expression to a variable. This gives a new overall state. The relationship between the values of one or more variables in the post-(multiple-)assignment state and the expressions that were used to express those values in the pre-assignment state is simply (and tautologically) that the values of the assigned expressions evaluated using the pre-assignment variable values are the same as the values of the expressions consisting of just the variable names evaluated using the post-assignment variable values (ie the post-assignment values of the variables). It doesn't matter what the types of variables are. If a language allows assignment to an expression then the language designer has to say what that means. Presumably the post-assignment values of the variables in the assigned-to expressions must be such that when they are evaluated in the post-assignment state then their values are the same as the values of the assigned- from expressions evaluated in the pre-assignment state. If the language processor cannot determine a single choice for the post-assignment values of variables then the language designer has to give some sort of policy. But again, the particular assigned-from expressions have no other relationship with the new state than that when evaluated in the old state they give the values of the variables in the new state. The particular assigned-from expressions don't matter, just their values. philip That's adding more notions, such as 'state' and 'before' and 'after', 'assignment to an expression' et al, all artifacts of certain physical programming attitudes if you ask me. I'm more interested in subtracting notions as far as possible. |
#15
| |||
| |||
|
|
Another example is assigning to a variable twice. *Various complications go away if a variable can be assigned to only once. *(Is there a name for such a variable? In the old days it might have been called a macro.) |
#16
| |||||
| |||||
|
|
Recently there has been mention of logical connectors being implicit in tuples, eg. Mr. Scott wrote: "Each row of the join represents a conjunction of propositions, one for each operand", ie., what I think is called a compound proposition. I sometimes write similar, as well regarding disjunctions. *But usually my purpose is simply to understand the algebra. I would like to ask where is the "information" to the effect that certain rows represent compound propositions recorded? |
|
"Each row of the join represents a conjunction of propositions, one for each operand" |
|
I would like to ask where is the "information" to the effect that certain rows represent compound propositions recorded? |
|
Where is the "information" to the effect that 2 + 2 = 4 recorded? Certainly not as attribute values within tuples within relations. |
|
a relation value that has been obtained by a language devices such as insert or assignment where the definition is based on union. The 'OR' disappears. |
#17
| |||
| |||
|
|
Suppose that a database embodies the following sentence, forall x forall y forall z Pxy \/ Qxz The database has two tables, let's call them P and Q, with predicates Pxy and Qxz respectively. |
|
The dependencies defined on the database also have an impact. |
|
inclusion dependency from P[x] to Q[x]. forall x forall y forall z Pxy iff Qxz |
#18
| |||
| |||
|
|
On Oct 28, 12:51 pm, paul c <toledobythe... (AT) oohay (DOT) ac> wrote: .... "Each row of the join represents a conjunction of propositions, one for each operand" This doesn't make sense. Perhaps "one from each operand"? If so, yes. The predicate associated with r JOIN s is (predicate associated with r) AND (predicate associated with s). So each result tuple present makes this true and each result tuple absent makes this false. ... |
#19
| |||
| |||
|
|
paul c wrote: Mr. Scott wrote: ... Let's explore a simple example. Suppose that a database embodies the following sentence, forall x forall y forall z Pxy \/ Qxz The database has two tables, let's call them P and Q, with predicates Pxy and Qxz respectively. Now suppose that at a given moment, P has rows {{x:a,y:b},{x:a,y:c},{x:b,y:c}} Q has rows {{x:a,z:d},{x:c,z:d}} then P JOIN Q would have rows {{x:a,y:b,z:d},{x:a,y:c,z:d}} Now let's apply logic. The ground formulas represented in P are Pab, Pac, Pbc. The ground formulas represented in Q are Qad, Qcd. What is represented in P JOIN Q? Pab /\ Qad, Pac /\ Qad. That's because P JOIN Q has the complex predicate Pxy /\ Qxz.. x being free in both P and Q is important because only those ground formulas in P and Q that have a common x value satisfy the predicate of P JOIN Q. It should be clear now that it is the nature of join that dictates that certain rows represent compound propositions, but there is more. The dependencies defined on the database also have an impact. There really isn't space here to go into detail, but suppose that the database embodies the sentence, forall x forall y forall z Pxy -> Qxz Now the database still consists not only of the same two tables, but also an inclusion dependency from P[x] to Q[x]. forall x forall y forall z Pxy iff Qxz Here the database would consist of just one table but each row would represent a biconditional. I have no argument about the application of logic. Perhaps my point has more to do with the language devices, such as 'insert', that are essentially an assignment. While they are defined in logical terms they are outside logic in the sense that when they are applied, something special happens, a 'die is cast', as it were. (Once we enter the realm of assignment, talk of possible base and view differences is inevitable. I don't think it's inapt to say that treating views differently from base values amounts to saying that assignment is polymorphic, ie., behaves differently depending. I don't see a necessary reason for that. But when dealing with a value that is the result of assignment, I think it remains clear that the view definition is effectively no more than a constraint on the view's value, and not a constrain on the base values in the expression of the view's definition. This may seem fuzzy and mystical perhaps due to my language not being really up to the task but if that can be forgiven, I would say that it is better to subtract notions than add them, ie., better to not introduce a difference.) Maybe it's useful to ask this: Was Codd trying to introduce assignment to logic, (eg. was he trying to augment predicate calculus) or was he trying to apply logic to the assignment of recorded values? |
#20
| |||
| |||
|
|
compdb (AT) hotmail (DOT) com wrote: On Oct 28, 12:51 pm, paul c <toledobythe... (AT) oohay (DOT) ac> wrote: ... "Each row of the join represents a conjunction of propositions, one for each operand" This doesn't make sense. Perhaps "one from each operand"? If so, yes. The predicate associated with r JOIN s is (predicate associated with r) AND (predicate associated with s). So each result tuple present makes this true and each result tuple absent makes this false. ... I was quoting Mr. Scott. Regardless, I don't agree with either interpretation. I realize that many, perhaps most, people who have been trained in logic or read about it would place my attitude somewhere between unfaithful and ignorant, but I would never try to tell a user that some predicates are conjunctions and some aren't. |
![]() |
| Thread Tools | |
| Display Modes | |
| |