Re: A good book
Date: Sat, 08 Jul 2006 02:29:01 GMT
Message-ID: <NLErg.7715$pu3.171840_at_ursa-nb00s0.nbnet.nb.ca>
Marshall wrote:
>>Bob Badour <bbadour_at_pei.sympatico.ca> 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.
If he is looking for a citable reference source, I would suggest the 1970 paper. Received on Sat Jul 08 2006 - 04:29:01 CEST