Re: A good book



Chris Smith wrote:
Bob Badour <bbadour@xxxxxxxxxxxxxxxx> wrote:
Chris Smith wrote:
I'm suggesting that you've yet to establish the connection between:

(a) predicate calculus and elegant code
(b) databases and predicate calculus

Relational calculus = 1st order predicate calculus

Am I missing something?

No, you're almost certainly not missing something. Nevertheless, what
I'm asking for ought to be relatively simple, so I'll try to explain it
another way.

As is pointed out here several times every five minutes (okay, not that
often...), database design and programming is rather frequently and
unfortnuately performed from very little theoretical basis at all. At
the same time, it's frequently stated that relational databases operate
on a solid mathematical foundation. That's a useful statement if and
only if that mathematical foundation provides tools that are useful in
practice for reasoning about behavior, transformations, correctness,
etc. of the code written in relational languages. If this connection is
not made, then all this talk about predicate calculus is pointless. I
am looking for the sources that explain how this connection is made.
Are there theorems of relational theory that suggest certain program
transformations, or certain criteria for correctness?

Relational theory is mostly about data, at least historically. So
I would change your question to being a question about theorems
in relational theory about data transformations, rather than
program transformations.

The obvious thing to me to mention is the normal forms.

The normal forms describe precisely schema in which
redundancy is present, and also show what anomalies
can occur as a result. They also show how it is possible
to perform a lossless decomposition such that some
redundancy is removed, eliminating the possibility for
the update anomalies associated with that particular
normal form.

In practice I have found that most of the problems
with databases can be traced to failure to adhere to
the normal forms.

Without the formal foundation, in particular the theoretical
understanding of keys, the normal forms would be impossible.
(Instead we'd have design patterns. :-)


You made a
comment in another thread that suggested that features added to
relational databases can be traced back to the mathematical model;
where's a source that explains how?

In brief:

Every relation has an associated predicate.
Every element of every table is a proposition.
Every relational algebra expression is an expression of
logical inference, deriving new propositions from existing
ones.


Marshall

.



Relevant Pages

  • Re: A good book
    ... predicate calculus and elegant code ... it's frequently stated that relational databases operate on a solid mathematical foundation. ... That's a useful statement if and only if that mathematical foundation provides tools that are useful in practice for reasoning about behavior, transformations, correctness, etc. of the code written in relational languages. ... He used it as an example of greater elegance. ...
    (comp.databases.theory)
  • Re: A good book
    ... predicate calculus and elegant code ... it's frequently stated that relational databases operate ... Relational theory is mostly about data, ... Using the relational calculus or the relational algebra to derive equivalent access paths for optimization does both. ...
    (comp.databases.theory)
  • Re: A good book
    ... predicate calculus and elegant code ... it's frequently stated that relational databases operate on a solid mathematical foundation. ... Are there theorems of relational theory that suggest certain program transformations, ... He used it as an example of greater elegance. ...
    (comp.databases.theory)
  • Re: A good book
    ... predicate calculus and elegant code ... it's frequently stated that relational databases operate ... Are there theorems of relational theory that suggest certain program ... to elegance where EWD provided a proof without iteration for something ...
    (comp.databases.theory)
  • Re: Existence as predicate
    ... In Predicate Calculus there is a metalogical assumption that ... > course there are some theorems, ... Actually, there are systems of Free Logic (slight variants of PCI), ... Hence there we c a n stipulate ...
    (sci.logic)