![]() | |
#651
| |||
| |||
|
|
What's not clear to me is whether or not the concept of "assignment" is inherently an imperative concept, and not reducible to purely declarative expression. I lean towards the view that assignment is inherently imperative. |
#652
| |||
| |||
|
|
Walter Mitty wrote: ... What's not clear to me is whether or not the concept of "assignment" is inherently an imperative concept, and not reducible to purely declarative expression. I lean towards the view that assignment is inherently imperative. In case you haven't seen it, here's a link to a widely-regarded, maybe even classic textbook: http://mitpress.mit.edu/sicp/full-te...oc_%_sec_3.1.3 |
|
see "The Costs of Introducing Assignment". The authors distinguish 'substitution model' as being a property of functional languages. I think the A-algebra (algebras typically involve the substitution model, what many of us were taught in grade school, if I've got it right) and with an equality operator are among what they might call the functional languages. I'd also say most people start with a schema that constrains the possible assignment variables/pointers (eg., by declaring the allowable relvar or table names in advance) and never consider the algebraic implications. This puts the systems they make on logical quicksand. For example, there are two kinds of constraints for any relation, implicit and explicit. If the algebra or equivalent is ignored, certain implicit constraints are ignored too, such as the projection identities (eg., Heath) and heading constraints, in other words, logical independence. In most application languages, you can't map or interpret a sin gle pointer to a set of algebraic symbols, but single algebraic expressions can be substituted for elements in the set of all possible language variables/pointers. I'd say when designing a schema it is logically safer to express the design constraints algebraically (with shorthands of course), then pick among the algebraic symbols that one prefers to interpret as variables/pointers. In a functional language, one needn't bother with this choice, that language will choose variables that satisfy the equations and we might not even need to know the definitions, eg., 'names', of all of them. In this sense, I'd say functional languages are at a 'higher-level' of abstraction and so too the A-algebra even though I'd guess many programmers would imagine it is somehow a 'lower-level' of detail. Beyond predictability, an algebra or calculus starting point may not matter to the average developer but it is crucial in the design of a dbms imlementation which must nearly optimize for practical execution times, eg., deciding whether an index can check a key constraint. Without that starting point, one is only guessing whether optimizations are logically sound and consistent. |
#653
| |||
| |||
|
|
"paul c" <toledobythesea (AT) oohay (DOT) ac> wrote in message news:F366l.5463$Ou7.4752 (AT) newsfe24 (DOT) iad... Brian Selzer wrote: ... is the case. That is the essence of database updates, which are definitely outside the scope of the algebra and the calculus. ... Database updates are indeed a relational model concept even though neither the algebra nor the calculus are sufficient to express them.. ... Taken together, those two sentences amount to a very familiar mysticism, trying to have it both ways. The RM is a model for a machine. Self-evident that it's not a model for people. For a db to be useful, obviously people must interpret the results of the model, ie., they agree to interpret its results the same way (in a given setting). An example - obviously Codd expected that the practical purpose his audience had in mind was that some results would persist on some medium. But his model doesn't require that. Persistence is often mistaken as being essential to Codd's model, but it's not, the model stands up quite well without any notion of persistence. Do the same with any other concept, remove it from the picture and then ask is there a practical interpretation of the results of the calculus or algebra as applied to some formal definition of relation. Don't worry about whether everybody in the world prefers that interpretation, just ask whether some people do. As the posts from many people on various c.d.t. threads over the years show, there are many interpretations and yet very few concepts needed. This is became most concepts people talk about are interpretive concepts. Such concepts can be excised from all talk about the formal model without harm. It's not clear to me what you mean by "Codd's model". In the footnotes to Codd's early work, it's clear that the relational model of data predates Codd's initial work. It also seems clear, at least to me, that Codd's early work dealt not with the relational model of data as such, but with the application of the relational model of data to the task of database organization and interface, and therefore to the task of database management system design. If I'm right about this, then the notion of persistence is central to what Codd was discussing, regardless of whether or not the notion of persistence is essential to the relational model of data. Throughout the history of c.d.t. there has been an ongoing ambiguity about whether the relational model is being proposed as the framework for a theory of databases or whether it's being proposed as the framework for a theory of computing in general. Not that it couldn't be proposed for both. Just that the discussion at each point remains clear only if the writer and the reader both know which proposal is being discussed. In the context of databases, Brian's term "database update" is crystal clear. There is a state of the database (out of all the possible states of that database) before the update. There is likewise a state of the database (out of all the possible states of the database) after the update. The database update is the difference between those two states, regardless what imperative form resulted in the updates taking place. In particular, it doesn't matter what combination of SQL UPDATE, DELETE or INSERT imperatives were performed, or in what sequence, or whether some other imperative language was used, as long as the difference remains the same. No confusion need exist between "database update" and "SQL update". Either that, or I'm misreading Brian's comments. What's not clear to me is whether or not the concept of "assignment" is inherently an imperative concept, and not reducible to purely declarative expression. I lean towards the view that assignment is inherently imperative. --boy did that last post format poorly |
#654
| |||
| |||
|
|
Walter Mitty wrote: ... What's not clear to me is whether or not the concept of "assignment" is inherently an imperative concept, and not reducible to purely declarative expression. I lean towards the view that assignment is inherently imperative. In case you haven't seen it, here's a link to a widely-regarded, maybe even classic textbook: http://mitpress.mit.edu/sicp/full-te...oc_%_sec_3.1.3 |
![]() |
| Thread Tools | |
| Display Modes | |
| |