Re: A good book
- From: "Marshall" <marshall.spight@xxxxxxxxx>
- Date: 7 Jul 2006 18:12:32 -0700
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
.
- Follow-Ups:
- Re: A good book
- From: Chris Smith
- Re: A good book
- From: Bob Badour
- Re: A good book
- References:
- A good book
- From: Chris Smith
- Re: A good book
- From: Bob Badour
- Re: A good book
- From: Chris Smith
- Re: A good book
- From: Bob Badour
- Re: A good book
- From: Chris Smith
- Re: A good book
- From: Bob Badour
- Re: A good book
- From: Chris Smith
- Re: A good book
- From: Bob Badour
- Re: A good book
- From: Chris Smith
- A good book
- Prev by Date: Re: A good book
- Next by Date: Re: A good book
- Previous by thread: Re: A good book
- Next by thread: Re: A good book
- Index(es):
Relevant Pages
|