![]() | |
![]() |
| | Thread Tools | Display Modes |
#21
| |||
| |||
|
|
David BL wrote: On Apr 15, 5:01 am, com... (AT) hotmail (DOT) com wrote: ... The relational algebra is just another syntax for FOPL. (So they can't possibly be at odds.) You are merely talking about the correspondence between formulae in FOL versus expressions in the RA. E.g. RA: project((R1 join R2) union R3, {X}) FOL: exists y,z such that (P1(x,y) /\ P2(y,z)) \/ P3(x,y,z) R1,R2,R3 are relvar names. X is an attribute name. P1,P2,P3 are predicate symbols. x,y,z are variables. ... Regarding precision, as far as I know, relvars are pointers and the several relational algebras do not manipulate pointers. |
|
(To me this means that an implementation of such an algebra doesn't require relvars.) |
#22
| |||
| |||
|
|
I'm not sure what you mean by saying that a relvar is a pointer. What does it point at? Or do you mean a relvar name is like a pointer that points at an assignable variable within a physical database? ... |
#23
| |||
| |||
|
|
David BL wrote: ... I'm not sure what you mean by saying that a relvar is a pointer. What does it point at? Or do you mean a relvar name is like a pointer that points at an assignable variable within a physical database? ... Nor I you. As I said, a relvar is a pointer, so not it's confusing to say it's 'like' one. I thought it 'pointed' to a value, maybe there is some cultural language nuance that I'm not able to comprehend that somehow makes a difference in the eyes of some beholder or othe. Maybe Bob B can explain the difference between a relational pointer and some other kind of pointer but I would have thought the difference was patent regardless of context. (I think 'assignment' is a difficult notion but am glad you mentioned it.) Personally, for practial reasons if none other, I would prefer to think of a pointer as being a pointer, regardless of cultural context. |
#24
| |||
| |||
|
|
Below 'variable' is restricted to something that can be accessed by imperative statements, and not to be confused with a FOL variable. I don't say a variable points at a value. I say a variable *holds* a value. I restrict my usage of the word "pointer" to mean a *value* that represents an address or you could say an identifier for a variable. So a pointer points at a variable, not directly at a value. E.g. In C++ int x = 10; int* p = &x; x is not a pointer. x is a variable that holds the value 10. p is a pointer variable that holds a pointer value. The pointer value points at the variable named x. There is no concept of a pointer value that points at the value 10. I don't understand what that could mean. Note that C++ outlaws the expression &10. |
#25
| |||
| |||
|
|
David BL wrote: ... Below 'variable' is restricted to something that can be accessed by imperative statements, and not to be confused with a FOL variable. I don't say a variable points at a value. I say a variable *holds* a value. I restrict my usage of the word "pointer" to mean a *value* that represents an address or you could say an identifier for a variable. So a pointer points at a variable, not directly at a value. E.g. In C++ int x = 10; int* p = &x; x is not a pointer. x is a variable that holds the value 10. p is a pointer variable that holds a pointer value. The pointer value points at the variable named x. There is no concept of a pointer value that points at the value 10. I don't understand what that could mean. Note that C++ outlaws the expression &10. What has C++ got to do with any algebraic language? What does assignment have to do with any algebraic language? |
|
(Regarding C++ I would say a more apt comparison with algebra symbols would be "const int x = 10;"). |
#26
| |||
| |||
|
|
E.g. In C++ int x = 10; int* p = &x; x is not a pointer. x is a variable that holds the value 10. p is a pointer variable that holds a pointer value. |
#27
| |||
| |||
|
|
David BL wrote: E.g. In C++ int x = 10; int* p = &x; x is not a pointer. x is a variable that holds the value 10. p is a pointer variable that holds a pointer value. Good point. (You must be a good pointer.) Meanwhile, in Algol 68, INT x := 10 is a shorthand for REF INT x = LOC INT; x := 10 i.e. a variable is of type reference to integer (Algol 68 doesn't use the term 'pointer'.) This is because INT x = 10 defines a *constant* x with the value 10. (The original C doesn't have constants.) So Algol 68 essentially agrees with paul's terminology, except that it uses 'reference' for 'pointer'. |
#28
| |||
| |||
|
|
David BL wrote: E.g. In C++ int x = 10; int* p = &x; |
|
is.c:9: warning: assignment makes pointer from integer without a cast; THEN "Segmentation fault" when binary is run. |
|
8: INT cannot be coerced to REF REF REF INT in a strong-unit |

![]() |
| Thread Tools | |
| Display Modes | |
| |